Beispiel #1
0
 public function upload()
 {
     $project = Project::open($_POST['project']);
     foreach ($_FILES as $file) {
         $node = NodeImage::createFromUpload($project->getPath(), $file['tmp_name']);
     }
 }
Beispiel #2
0
 public function getNode($name)
 {
     if (preg_match('/\\.(jpg|jpeg|png|gif)$/i', $name)) {
         return NodeImage::open($this->path . $name);
     } else {
         if (preg_match('/\\.md$/i', $name)) {
             return NodeText::open($this->path . $name);
         }
     }
     return null;
 }