This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'RstConvert.php'; | |
$zf2Bin = '/path_to_zf2/bin'; | |
$docbookPath = '/path_to_zf2/documentation/manual/en/module_specs'; | |
foreach (glob("$docbookPath/*.xml") as $filename) { | |
$fileout = RstConvert::xmlFileNameToRst(basename($filename)); | |
echo "Generating...$fileout\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZF2 Documentation State of Art | |
------------------------------ | |
Authentication (ok) | |
Barcode (ok) | |
Cache (to fix) | |
Captcha (ok) | |
Code (to be completed) | |
Config (ok) | |
Console (to be completed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Zend\Crypt\Password\Apache; | |
$apache = new Apache(); | |
$apache->setFormat('crypt'); | |
printf ("CRYPT output: %s\n", $apache->create('password')); | |
$apache->setFormat('sha1'); | |
printf ("SHA1 output: %s\n", $apache->create('password')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enrico@enrico-desktop:~/Lavoro/Git/zf2/tests$ phpunit Zend\Mvc | |
PHPUnit 3.7.13 by Sebastian Bergmann. | |
Cannot open file "ZendMvc.php". | |
enrico@enrico-desktop:~/Lavoro/Git/zf2/tests$ phpunit ZendTest/Mvc | |
PHPUNIT: 3.7.13 | |
PHPUnit 3.7.13 by Sebastian Bergmann. | |
Configuration read from /home/enrico/Lavoro/Git/zf2/tests/phpunit.xml.dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./composer.phar install | |
Loading composer repositories with package information | |
Installing dependencies | |
- Installing zendframework/zend-version (2.1.1) | |
Loading from cache | |
- Installing zendframework/zendframework (2.1.1) | |
Loading from cache | |
zendframework/zendframework suggests installing doctrine/common (Doctrine\Common >=2.1 for annotation features) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback | |
* | |
* @param integer $length | |
* @param bool $strong true if you need a strong random generator (cryptography) | |
* @return string | |
* @throws Exception\RuntimeException | |
*/ | |
public static function getBytes($length, $strong = false) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rename the Zend\Stdlib\ArrayObject in Zend\Stdlib\ArrayObjectPHPFuture | |
// and copy he Zend\Stdlib\compatibility\ArrayObject in Zend\Stdlib\ArrayObjectPHPLegacy | |
if (version_compare(PHP_VERSION, '5.3.4', 'lt') { | |
class_alias('Zend\Stdlib\ArrayObjectPHPLegacy', 'ArrayObject'); | |
} else { | |
class_alias('Zend\Stdlib\ArrayObjectPHPFuture', 'ArrayObject'); | |
} | |
$test = new ArrayObject(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$database = ''; | |
$hostname = ''; | |
$port = ''; | |
$user = ''; | |
$password = ''; | |
return array( | |
'db' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$database = ''; | |
$user = ''; | |
$password = ''; | |
$hostname = ''; | |
$port = 446; | |
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;". | |
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/GET /user | |
OK Response (200): | |
{ | |
"user" : { | |
"name" : "Foo", | |
"email" : "[email protected]" | |
} | |
} |