Example #1
0
 public function GETaudio()
 {
     $view = new \bloc\view('views/layout.html');
     $graph = \Models\Graph::instance();
     $this->tracks = $graph->query('/graph')->find('/track');
     $view->main = 'views/audio.html';
     return $view->render($this());
 }
Example #2
0
 public static function ID($id)
 {
     if ($id === null) {
         return null;
     }
     if (!($element = Graph::instance()->storage->getElementById($id))) {
         throw new \InvalidArgumentException("{$id}... Doesn't ring a bell.", 1);
     }
     return $element;
 }