In http://auraphp.com/manuals/v1/en/package-organization/:
First, create the package structure (just the parts we need):
...
Let us create our controller. Open your favourite editor and save the code below
... >
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
<html> | |
<head> | |
<title>Standalone Form Component</title> | |
</head> | |
<body> | |
<form action="#" method="post"> | |
<?php echo $view['form']->widget($form); ?> | |
<input type="submit" /> | |
</form> | |
</body> |
public function value(&$value, $method, $name) | |
{ | |
// get the params | |
$params = func_get_args(); | |
array_shift($params); // $value | |
array_shift($params); // $method | |
array_shift($params); // $name | |
// set up the field name and data | |
$field = 'field'; |
<?php | |
// start PHP with: php -S localhost:8888 -t . spider.php | |
$site = 'http://www.targetwebsite.org/'; | |
$path = $_SERVER["REQUEST_URI"]; | |
if ($path == '/') { | |
$path = '/index.html'; |
// Require the file | |
$class = "ClassName"; | |
$r = new ReflectionClass($class); | |
$str = ''; | |
foreach($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { | |
$rm = new ReflectionMethod($class, $method->name); | |
$pieces = array(); | |
foreach($rm->getParameters() as $params ) { |
In http://auraphp.com/manuals/v1/en/package-organization/:
First, create the package structure (just the parts we need):
...
Let us create our controller. Open your favourite editor and save the code below
... >
# originally from Joe Stump at Digg | |
for i in `$SVNLOOK changed -t "$TXN" "$REPOS" | /usr/bin/awk '{print $2}'` | |
do | |
if [ ${i##*.} == php ]; then | |
CHECK=`$SVNLOOK cat -t "$TXN" "$REPOS" $i | /usr/bin/php5 -d html_errors=off -l || echo $i` | |
RETURN=`echo $CHECK | /bin/grep "^No syntax" > /dev/null && echo TRUE || echo FALSE` | |
if [ $RETURN = 'FALSE' ]; then | |
echo $CHECK 1>&2; | |
exit 1 |
StaticFile { | |
Extensions { | |
123 = application/vnd.lotus-1-2-3 | |
3dml = text/vnd.in3d.3dml | |
3ds = image/x-3ds | |
3g2 = video/3gpp2 | |
3gp = video/3gpp | |
7z = application/x-7z-compressed | |
aab = application/x-authorware-bin | |
aac = audio/x-aac |
<?php | |
/** | |
* Send reconfigure=1 as a GET param to configure the example correctly. | |
* Omit to see the results from PHP's default SSL context settings. | |
* This example script reflects output from https://www.howsmyssl.com. | |
*/ | |
$reconfigure = isset($_GET['reconfigure']) ? (bool) $_GET['reconfigure'] : false; | |
/** | |
* https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_Ciphersuite | |
*/ |
<?php | |
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);} |