for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Admin localization
* @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.com.ua)
* @author Aleksandr Torosh <[email protected]>
*/
namespace YonaCMS\Plugin;
use Phalcon\Mvc\User\Plugin;
class AdminLocalization extends Plugin
{
public function __construct($config)
$file = APPLICATION_PATH . '/../data/translations/admin/' . $config->admin_language . '.php';
if (!is_file($file)) {
die("file $file not exists");
}
$translations = include($file);
$this->getDI()->set('admin_translate', new \Phalcon\Translate\Adapter\NativeArray(array('content' => $translations)));
set
$this->getDI()
null
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.