コード例 #1
0
ファイル: Application.php プロジェクト: onysko/signin
 /**
  * Application constructor.
  *
  * @param string $path
  * @param ResourcesInterface $resources
  * @param SystemInterface $system
  */
 public function __construct($path, ResourcesInterface $resources, SystemInterface $system)
 {
     // Inject dependencies
     $this->social = m('socialemail');
     $this->request = url();
     $this->query = new dbQuery();
     parent::__construct($path, $resources, $system);
 }
コード例 #2
0
ファイル: Application.php プロジェクト: expenect/application
 /** Constructor */
 public function __construct($path = null, $vid = null, $resources = null)
 {
     // Save CMSApplication instance
     if (!in_array(get_class($this), array(__CLASS__, 'samson\\cms\\App'))) {
         self::$loaded[$this->id] =& $this;
     }
     // If now collection class is set
     if (!isset($this->collectionClass[0])) {
         // Temporary build collection class name manually
         $className = get_class($this);
         $namespace = substr($className, 0, strrpos($className, '\\'));
         $this->collectionClass = $namespace . '\\Collection';
     }
     // Check form class configuration
     if (!class_exists($this->formClassName)) {
         e('## application form class(##) is not found', E_CORE_ERROR, array($this->id, $this->formClassName));
     }
     // Create database object
     $this->query = new dbQuery('material');
     parent::__construct($path, $vid, $resources);
 }
コード例 #3
0
ファイル: Application.php プロジェクト: samsoncms/signin
 /**
  * Application constructor.
  *
  * @param string $path
  * @param ResourcesInterface $resources
  * @param SystemInterface $system
  *
  * @ InjectArgument(socialEmail="samson\social\email\Email")
  * @ InjectArgument(request="samson\url\URL")
  * @ InjectArgument(queryInterface="samsonframework\orm\QueryInterface")
  *
  * @ InjectArgument(resources="samsonframework\core\ResourcesInterface")
  * @ InjectArgument(system="samsonframework\core\SystemInterface")
  */
 public function __construct($path, Email $socialEmail, URL $request, QueryInterface $queryInterface, ResourcesInterface $resources, SystemInterface $system)
 {
     parent::__construct(realpath(__DIR__ . '/../'), $resources, $system);
     // Inject dependencies
     //        $this->social = $this->system->module('socialemail');
     //        $this->request = $this->system->module('samsonos_php_url');
     //        $this->query = new dbQuery();
     $this->social = $socialEmail;
     $this->request = $request;
     $this->query = $queryInterface;
 }
コード例 #4
0
ファイル: Application.php プロジェクト: rmolodyko/application
 /**
  * Application constructor.
  *
  * @param string $path
  * @param ResourcesInterface $resources
  * @param SystemInterface $system
  * @param QueryInterface $query
  * @throws ApplicationFormClassNotFound
  * @internal param RequestInterface $request
  */
 public function __construct($path, ResourcesInterface $resources, SystemInterface $system, QueryInterface $query = null)
 {
     $this->query = $query;
     // Save CMSApplication instance
     if (!in_array(get_class($this), array(__CLASS__, 'samson\\cms\\App'))) {
         self::$loaded[$this->id] =& $this;
     }
     // If now collection class is set
     if (!isset($this->collectionClass[0])) {
         // Temporary build collection class name manually
         $className = get_class($this);
         $namespace = substr($className, 0, strrpos($className, '\\'));
         $this->collectionClass = $namespace . '\\Collection';
     }
     // Check form class configuration
     if (!class_exists($this->formClassName)) {
         throw new ApplicationFormClassNotFound(array($this->id) . ' application form class ' . array($this->formClassName) . ' is not found');
     }
     // Create database object
     $this->query = new dbQuery('material');
     parent::__construct($path, $resources, $system);
 }
コード例 #5
0
ファイル: CMS.php プロジェクト: samsoncms/api
 /**
  * CMS constructor.
  *
  * @param string $path
  * @param ResourcesInterface $resources
  * @param SystemInterface $system
  */
 public function __construct($path, ResourcesInterface $resources, SystemInterface $system)
 {
     $this->database = db();
     parent::__construct($path, $resources, $system);
 }