PHP code example of chigix / chiji
1. Go to this page and download the library: Download chigix/chiji library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chigix / chiji example snippets
// /path/to/conf-file.php
class ConfigFile extends \Chigi\Chiji\Project\ProjectConfig {
public function getProjectName() {
return "AppName";
}
}
return new ConfigFile();
$project = new \Chigi\Chiji\Project\Project("/path/to/conf-file.php");
\Chigi\Chiji\Util\ProjectUtil::registerProject($project);
foreach ($project->getReleaseDirs() as $dir) {
// ... Clean and init release directories.
}
foreach ($project->getSourceDirs() as $dir) {
// ... scan the directory for register files as resource.
$project->getResourceByFile($file);
// ...
}
foreach ($project->getRegisteredResources() as $resource) {
if ($resource instanceof \Chigi\Chiji\File\Annotation) {
$resource->analyzeAnnotations();
}
}
foreach ($project->getReleasesCollection() as $resource) {
$project->getMatchRoad($resource->getFile())->releaseResource($resource);
}