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 | |
| // [[1,2,[3]],4] -> [1,2,3,4] | |
| $array = array(array(1,2,array(3)),4); | |
| function citrusbyte_test_array($array,$returnVal) { | |
| for($i = 0; $i <= count($array); $i++) { | |
| if(isset($array[$i])&& is_array($array[$i])) { | |
| $returnVal = citrusbyte_test_array($array[$i], $returnVal); |
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
| What is bundle? | |
| • Bundle is a set of files and directories. | |
| • Bundle is a totally separate code that you can easily import or create | |
| your own into your project. It is not like a fully developed plugin or blog, | |
| you need to optimize it. | |
| • Registering a bundle(AppKernel class) | |
| Rules for generating a bundle | |
| • Use only alphanumeric characters and underscores; | |
| • Use a CamelCased name; |
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 | |
| use App\Lib1\MyClass1 as MC1; | |
| use App\Lib1\MyClass2 as MC2; | |
| use App\Lib1\MyClass3 as MC3; | |
| //require_once("App\Lib1\MyClass1.php"); | |
| //echo \App\Lib1\MYCONST . "\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
| ====================================================================== | |
| Symfony 2 basic command | |
| ====================================================================== | |
| php app/console cache:clear --env=prod --no-debug | |
| generate bundle | |
| php app/console generate:bundle --namespace=Acme/StoreBundle | |
| parameters.yml | |
| php app/console doctrine:database:create |