function boot(Application $app) { $app->task('pipe:precompile', function () use($app) { $targetDirectory = $app['pipe.precompile_directory']; $assets = (array) $app['pipe.precompile']; $manifest = new Manifest($app['pipe.environment'], "{$targetDirectory}/manifest.json", $targetDirectory); $manifest->setLogger($app['log']); $manifest->compile($assets); })->description = "Precompile assets"; }
/** * @see \Components\Classloader::initialize() \Components\Classloader::initialize() */ public function initialize() { $iterator = new \RegexIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->m_path)), '/.manifest$/', \RecursiveRegexIterator::MATCH); foreach ($iterator as $entry) { try { $manifest = Manifest::forComponent(basename($entry->getPath())); } catch (Runtime_Exception $e) { continue; } $this->addClasspath($manifest->getNamespace(Manifest::SOURCE_TYPE_MAIN), $manifest->getClasspath(Manifest::SOURCE_TYPE_MAIN), $this->m_patternInclude); } }
/** * Set the extension name * * The description is preset to "<name>_XML_DESCRIPTION", if not already set. * * @param string $name Language name. This is a translatable field. * * @return $this This object, to provide a fluent interface */ public function setName($name) { parent::setName($name); $this->sections['metadata']['name'] = $name; return $this; }
/** * Get the attributes for the module manifest * * @return array */ public function getAttributes() { $attributes = parent::getAttributes(); if (!empty($this->client)) { $attributes['@client'] = $this->getClient(); } return $attributes; }
/** * Get the attributes for the module manifest * * @return array */ public function getAttributes() { $attributes = parent::getAttributes(); $attributes['@client'] = $this->getClient(); return $attributes; }
/** * Get the attributes for the plugin manifest * * @return array */ public function getAttributes() { $attributes = parent::getAttributes(); $attributes['@group'] = $this->getGroup(); return $attributes; }
/** * Get the manifest structure * * @return array */ public function getStructure() { $data = parent::getStructure(); $this->addElement($data['extension'], 'libraryname'); $this->addElement($data['extension'], 'packager'); $this->addElement($data['extension'], 'packagerurl'); return $data; }
case E_USER_WARNING: echo "<b>My WARNING</b> [{$errNo}] {$errStr}<br />\n"; break; case E_USER_NOTICE: echo "<b>My NOTICE</b> [{$errNo}] {$errStr}<br />\n"; break; default: echo "Unknown error type: [{$errNo}] {$errStr}<br>{$errFile} Line {$errLine}<br />\n"; break; } /* Don't execute PHP internal error handler */ return true; }); if (file_exists(BASE_PATH . '/vendor/autoload.php')) { require_once BASE_PATH . '/vendor/autoload.php'; } else { user_error('It doesnt look like you\'ve done a composer update.', E_USER_WARNING); } require_once 'utils/ClassLoader.php'; require_once 'utils/Object.php'; require_once 'utils/TokenisedRegularExpression.php'; require_once 'utils/Manifest.php'; require_once 'utils/ClassManifest.php'; require_once 'utils/ConfigManifest.php'; if (Manifest::make_manifest()) { Manifest::reload_manifest(); } $loader = ClassLoader::instance(); $loader->registerAutoLoader(); DB::init(); Router::route();
/** * @desc get the current manifest from disk. * @returns Manifest */ function getManifest($reload = false) { if (!$reload && !empty($this->manifest)) { return $this->manifest; } $registry =& JFactory::getConfig(); $manifest = new Manifest(); $lastupdate = $registry->getValue('com_updater.manifesttime', 0); if (!file_exists(SOFTWAREMANIFESTLOCATION) || $lastupdate + UPDATER_FREQUENCY < time()) { $this->retrievemanifest(); } $manifest->loadManifest(SOFTWAREMANIFESTLOCATION); $this->manifest = $manifest; return $manifest; }
protected function discoverTestPaths($path_) { if (is_file("{$path_}/.manifest")) { try { $manifest = Manifest::forComponent(basename($path_)); } catch (Runtime_Exception $e) { return; } if (is_dir($path = $manifest->getClasspath(Manifest::SOURCE_TYPE_TEST_UNIT))) { $this->addTestPathToClassPath($path, $manifest->getNamespace(Manifest::SOURCE_TYPE_TEST_UNIT)); } } $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path_), \RecursiveIteratorIterator::CHILD_FIRST); foreach ($iterator as $entry) { if ($entry->isDir() && 0 !== strpos($entry->getBasename(), '.')) { $this->discoverTestPaths($entry->getRealpath()); } } }
public static function build_file_manifest($base) { $files = self::find_files($base); file_put_contents(TEMP_PATH . '/file_manifest', serialize($files)); self::$file_manifest = $files; }