Prado\Web\Services\TPageService::init PHP Метод

init() публичный Метод

This method is required by IService interface and is invoked by application.
public init ( $config )
    public function init($config)
    {
        Prado::trace("Initializing TPageService", '\\Prado\\Web\\Services\\TPageService');
        $pageConfig = $this->loadPageConfig($config);
        $this->initPageContext($pageConfig);
        $this->_initialized = true;
    }

Usage Example

Пример #1
0
 public function init($config)
 {
     if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) {
         throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes.");
     }
     if (empty($this->_pass)) {
         throw new TConfigurationException("You need to specify the Password attribute.");
     }
     $this->setDefaultPage("TWsatHome");
     $this->_startThemeManager();
     parent::init($config);
 }