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 | |
| 'router' => | |
| [ | |
| // Active le support du translator pour les portions de route marquées par {translation_key} | |
| // Il faut lui injecter un translator | |
| 'router_class' => 'Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack', | |
| // Valeurs par défaut pour toutes les routes | |
| 'default_params' => |
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
| 'doctrine' => | |
| [ | |
| 'configuration' => | |
| [ | |
| 'orm_default' => | |
| [ | |
| 'string_functions' => | |
| [ | |
| 'func_name' => 'class_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 | |
| $clone = new ArrayCollection; | |
| $steps = 10000; | |
| $instances = []; | |
| $start['new'] = microtime(true); | |
| foreach (range(1, $steps) as $k) { | |
| $instances[] = new ArrayCollection; | |
| } |
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 | |
| $segments = ['one', 'two', 'three']; | |
| $copy = $segments; | |
| $assoc = []; | |
| foreach ($segments as $key => $seg) | |
| { | |
| $segment = next($copy); |
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 | |
| namespace Project\Raw { | |
| define('VT', 100000); | |
| $mt['NS no Backslash']['start'] = microtime(true); | |
| for ($i = 0; $i < VT; $i++) { | |
| is_array(VT); | |
| is_string(VT); | |
| is_object(VT); |
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 | |
| // Error: Trait method init has not been applied... | |
| class Node implements NodeInterface { | |
| use Component\Attribute, | |
| Component\Manipulation { | |
| Component\Attribute::init as protected attributes; | |
| Component\Manipulation::init as protected manipulation; | |
| } | |
| } |
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
| if ( ! class_exists($class)) | |
| { | |
| if ( ! class_exists($class = $viewmodel) or ! class_exists($class = '\\View_'.ucfirst($viewmodel))) | |
| { | |
| throw new \OutOfBoundsException('ViewModel "View_'.ucfirst(str_replace(array('/', DS), '_', $viewmodel)).'" could not be found.'); | |
| } | |
| } |
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
| // parent controller in global namespace | |
| abstract class Controller_Application extends Controller { | |
| protected static $_vm = 'application'; | |
| public function before() | |
| { | |
| $this->view = ViewModel::forge($this->_vm); | |
| } |
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
| $('.fancybox').fancybox({ | |
| afterLoad: function(e) { | |
| $(e.inner).find('iframe').attr({ | |
| 'webkitallowfullscreen': true, | |
| 'mozallowfullscreen': true | |
| }); | |
| } | |
| }); |
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
| public static function is_html($string) | |
| { | |
| return strlen(strip_tags($string)) < strlen($string); | |
| } |