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 Game; | |
use \Game\Connection\Interfaces\Connection; | |
use Game\Module\Interfaces\Command; | |
use InvalidArgumentException; | |
/** | |
* Game input handler |
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 Modules\Help\Command; | |
use Game\Connection\Interfaces\Connection; | |
use Game\Helper\Output as OutputHelper; | |
use Game\Input; | |
use Game\Module\Entity\Interfaces\Manager as EntityManager; | |
use Game\Output; |
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
app/ | |
- config/ | |
- config.ini | |
- Controllers/ | |
- ClaimsController.php | |
- Library/ | |
- Claims.php | |
- Models | |
- Claims | |
- Entity.php |
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 // app/controllers/IndexController.php | |
class IndexController extends \Phalcon\Mvc\Controller | |
{ | |
//Index Controller | |
public function indexAction() | |
{} | |
} | |
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 MyLib extends \Phalcon\Di\InjectionAware | |
{ | |
private $filename; | |
public function __construct(\Phalcon\DiInterface $di) | |
{ | |
$this->setDI($di); | |
$this->filename = $this->getDI()->get('config')->daemon->hb_filename; |
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
server { | |
listen 80; | |
server_name demo.dev; |
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 CsvTableLogHandler extends \Phalcon\Mvc\Model | |
{ | |
public function setTable($table) | |
{ | |
$this->setSource($table); | |
} | |
} |
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
/etc/nginx/sites-available/example.com.conf | |
------------------------ | |
server { | |
listen 80; | |
server_name example.com; | |
return 301 http://www.example.com$request_uri; | |
} | |
server { | |
listen 80; | |
server_name example2.com; |
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 // file [project]/Library/View.php | |
namespace YourNamespace\Library; | |
class extendedView extends \Phalcon\Mvc\View | |
{ | |
public function getPartial($path, $params = array()) | |
{ | |
ob_start(); | |
$this->partial($path, $params); | |
return ob_get_clean(); |
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 | |
$data = strtolower(trim($data)); | |
if ( ! strlen($data)) { // "" | |
$r = ''; | |
} elseif (is_numeric($data) || is_bool($data)) { // "0" "1" 0 1 false true | |
$r = ((bool)intval($data) ? 'Yes' : 'No'); |
NewerOlder