Changeset 670

Show
Ignore:
Timestamp:
05/27/07 16:16:52 (1 year ago)
Author:
schst
Message:

Added links to conference examples

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cache

    • Property svn:ignore changed from
      *.cache
      to
      *.cache
      users.csv
  • trunk/examples/index.php

    r665 r670  
    8484      </li> 
    8585    </ul> 
     86 
     87    <h1 style="font-size: 21px;">Conference examples</h1> 
     88    <p> 
     89        The following examples have been created for various conferences. 
     90    </p> 
     91    <ul> 
     92      <li> 
     93        <a href="http://www.slideshare.net/stubbles/declarative-development-using-annotations-in-php">Declarative Development with Annotations</a> at the International PHP 2007 Conference in Ludwigsburg 
     94        <ul> 
     95          <li> 
     96            <a href="ipc07/xmlSerializer.php">Serializing to XML</a> (<a href="showsource.php?group=ipc07&example=xmlSerializer">show PHP source</a>) 
     97          </li> 
     98          <li> 
     99            <a href="ipc07/csvWriter.php">Serializing to CSV</a> (<a href="showsource.php?group=ipc07&example=csvWriter">show PHP source</a>) 
     100          </li> 
     101        </ul> 
     102      </li> 
     103    </ul> 
    86104  </body> 
    87105</html> 
  • trunk/examples/ipc07/csvWriter.php

    r669 r670  
    3535 * A person 
    3636 * 
    37  * @CSV(file="users.csv", 
     37 * @CSV(file="../../cache/users.csv", 
    3838 *      delimeter=";") 
    3939 */ 
     
    9797        } 
    9898        $csv = $class->getAnnotation('CSV'); 
     99 
    99100        $fp = fopen($csv->file, 'a'); 
    100101        $fields = array(); 
     
    112113 
    113114CSVWriter::write($user); 
     115 
     116echo "<pre>"; 
     117echo file_get_contents('../../cache/users.csv'); 
     118echo "</pre>"; 
    114119?> 
  • trunk/examples/ipc07/xmlSerializer.php

    r669 r670  
    102102$serializer->serialize($user, $writer); 
    103103 
     104echo "<pre>"; 
     105 
     106echo htmlentities($writer->asXML()); 
     107 
     108echo "\n\n"; 
     109echo "Using the PHP reflection\n"; 
    104110$class = new ReflectionClass('Person'); 
    105111echo $class->getName() . "\n"; 
     
    108114} 
    109115 
     116echo "\n"; 
     117echo "Using the Stubbles reflection\n"; 
    110118$class = new stubReflectionClass('Person'); 
    111119if ($class->hasAnnotation('XMLTag')) { 
     
    120128    } 
    121129} 
    122  
    123  
    124 //echo $writer->asXML(); 
     130echo "</pre>"; 
    125131?>