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 ShareModels\Traits { | |
use Phalcon\Mvc\Model\Behavior\Timestampable as TimestampableBehavior; | |
/** | |
* Class Timestampable | |
* | |
* @method addBehavior |
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
>>> 0x7f6a92e01c20 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e01bd0 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e01b80 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e01b30 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e01ae0 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e01a90 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_functionCall | |
>>> 0x7f6a92e01a40 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression | |
>>> 0x7f6a92e019f0 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_compileEcho | |
>>> 0x7f6a92e019a0 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler__statementList | |
>>> 0x7f6a92e01950 1 zim_Phalcon_Mvc_View_Engine_Volt_Compiler_compileForeach |
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
after "deploy", "deploy:cleanup" | |
after "deploy:update_code", "composer:install" | |
before "composer:install", "composer:copy_vendors" | |
after "composer:install", "phpunit:run_tests" | |
namespace :composer do | |
desc "Copy vendors from previous release" | |
task :copy_vendors, :except => { :no_release => true } do | |
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi" | |
end |
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 | |
/** | |
* Class fuck | |
*/ | |
trait fuck | |
{ | |
public function test() | |
{ |
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 = new Phalcon\Mvc\Router(false); | |
$router->notFound(array( | |
'controller' => 'user', | |
'action' => 'show404' | |
)); | |
$router->add('/login/', 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
dispatch:beforeDispatchLoop | |
dispatch:beforeDispatch | |
dispatch:beforeNotFoundAction | |
dispatch:beforeExecuteRoute | |
dispatch:afterInitialize | |
dispatch:afterExecuteRoute | |
dispatch:afterDispatch | |
dispatch:afterDispatchLoop | |
dispatch:beforeException |
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 | |
$compiler = new \Phalcon\Mvc\View\Engine\Volt\Compiler(); | |
$compiler->addFunction("test1", function($resolvedArgs, $exprArgs) { | |
$value = $exprArgs[0]['expr']['value']; | |
return str_replace('$', '€', $value); | |
}); |
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 Phalcon\DI , Phalcon\Db\Adapter\Pdo\Mysql as Connection , Phalcon\Mvc\Model\Manager as ModelsManager , Phalcon\Mvc\Model\Metadata\Memory as MetaData , Phalcon\Mvc\Model; | |
$di = new DI(); | |
//Setup a connection | |
$di->set( | |
'db' , | |
new Connection(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 | |
$compiler = new \Phalcon\Mvc\View\Engine\Volt\Compiler(); | |
$compiler->addFunction('not_empty', '!empty'); | |
echo highlight_string($compiler->compileString(' | |
{% if not_empty(userinfo.vk) %} | |
<a id="vk" href="{{ userinfo.vk }}">vk</a> |
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 | |
class Torrent | |
{ | |
public function scrape(array $announce = [ ] , $hash_info = null) | |
{ | |
$r = [ | |
'seeders' => 0 , | |
'leechers' => 0 |