Beispiel #1
0
 /**
  * Setup the Application Paths
  * @param \Jazz\Application\ISettings $settings
  * @param \Jazz\Loader\IEngine $engine
  */
 public function setupApplication(\Jazz\Application\ISettings $settings, \Jazz\Loader\IEngine $engine)
 {
     $engine->setReturnFilePath(true);
     $path = $this->formatApplicationPath($settings);
     if (file_exists($path)) {
         $engine->appendPath(new \Jazz\Loader\Path($path, null, null, null, 'phtml'));
     }
 }
Beispiel #2
0
 /**
  * Setup the Component Paths
  * @param \Jazz\Application\ISettings $settings
  * @param \Jazz\Loader\IEngine $engine
  * @param string $name
  */
 public function setupComponent(\Jazz\Application\ISettings $settings, \Jazz\Loader\IEngine $engine, $name)
 {
     $engine->setReturnFilePath(true);
     $path = $this->formatComponentPath($settings, $name);
     if (file_exists($path)) {
         $engine->appendPath(new \Jazz\Loader\Path($path, null, null, null, 'ini'));
         $engine->appendPath(new \Jazz\Loader\Path($path, null, null, null, 'php'));
     }
 }
Beispiel #3
0
 /**
  * Setup the Component Paths
  * @param \Jazz\Application\ISettings $settings
  * @param \Jazz\Loader\IEngine $engine
  * @param string $name
  */
 public function setupComponent(\Jazz\Application\ISettings $settings, \Jazz\Loader\IEngine $engine, $name)
 {
     $engine->setIsClass(true);
     $engine->setReturnClassName(true);
     $path = $this->formatComponentPath($settings, $name);
     if (file_exists($path)) {
         $ns = $this->formatComponentNamespace($settings, $name);
         $engine->appendPath(new \Jazz\Loader\Path($path, $ns, null, null, 'php', $settings->getSeparator()));
     }
     $path = $this->formatLibraryPath($settings);
     if (file_exists($path)) {
         $ns = $this->formatLibraryNamespace($settings);
         $engine->appendPath(new \Jazz\Loader\Path($path, $ns, null, null, 'php', $settings->getSeparator()));
     }
 }
Beispiel #4
0
 /**
  * Registers an Engine (with a define 'key')
  * @param \Jazz\Loader\IEngine $obj
  * @param string $key
  * @param string $patterns,... assigns patterns to the KEY
  * @postcondition appends Jazz Model Behavior directory to Behavior path
  * @postcondition replaces Engine if already defined
  */
 public function register(\Jazz\Loader\IEngine $obj, $key = self::KEY, $pattern = null)
 {
     $obj->setIsClass(true);
     parent::register($obj, $key);
 }