create_from_path() 공개 정적인 메소드

Used by the sync task
public static create_from_path ( string $path ) : DNProject
$path string
리턴 DNProject
예제 #1
0
 /**
  * Sync the in-db project list with a list of file paths
  * @param array $paths Array of pathnames
  * @param boolean $dryRun
  */
 public function syncWithPaths($paths, $dryRun = false)
 {
     foreach ($paths as $path) {
         if (!$this->filter('Name', $path)->count()) {
             $this->message($path);
             if (!$dryRun) {
                 DNProject::create_from_path($path)->write();
             }
         }
     }
 }