public function convertDriverDocumentToPod(\triagens\ArangoDb\Document $driverDocument)
    {
        switch ($driverDocument) {
            case $driverDocument instanceof \triagens\ArangoDb\Vertex:
                $model = $this->dispense("vertex");
                break;

            case $driverDocument instanceof \triagens\ArangoDb\Edge:
                $model = $this->dispense("edge");
                break;

            default:
                @list($collection,) = explode('/', $driverDocument->getInternalId(), 2);
                $model = $this->dispense($collection);
        }

        $model->getPod()->loadFromDriver($driverDocument);
        $model->getPod()->setSaved();

        //Signal here
        $this->notify("after_open", $model->getPod());

        return $model;
    }
public function convertDriverDocumentToPod(\triagens\ArangoDb\Document $driverDocument)
    {
        switch ($driverDocument) {
            case $driverDocument instanceof \triagens\ArangoDb\Vertex:
                $model = $this->dispense("vertex");
                break;

            case $driverDocument instanceof \triagens\ArangoDb\Edge:
                $model = $this->dispense("edge");
                break;

            default:
                @list($collection,) = explode('/', $driverDocument->getInternalId(), 2);
                $model = $this->dispense($collection);
        }

        $model->getPod()->loadFromDriver($driverDocument);
        $model->getPod()->setSaved();

        //Signal here
        $this->notify("after_open", $model->getPod());

        return $model;
    }
public function convertDriverDocumentToPod ( \ triagens \ ArangoDb \ Document $ driverDocument ) { switch ( $ driverDocument ) { case $ driverDocument instanceof \ triagens \ ArangoDb \ Vertex : $ model = $ this -> dispense ( "vertex" ) ; break ; case $ driverDocument instanceof \ triagens \ ArangoDb \ Edge : $ model = $ this -> dispense ( "edge" ) ; break ; default : @ list ( $ collection , ) = explode ( '/' , $ driverDocument -> getInternalId ( ) , 2 ) ; $ model = $ this -> dispense ( $ collection ) ; } $ model -> getPod ( ) -> loadFromDriver ( $ driverDocument ) ; $ model -> getPod ( ) -> setSaved ( ) ; //Signal here $ this -> notify ( "after_open" , $ model -> getPod ( ) ) ; return $ model ; }
Converts an ArangoDB-PHP document, edge or vertex into a pod.
@param  \triagens\ArangoDb\Document $driverDocument The ArangoDB-PHP document, edge or vertex.
@return AModel
Converts an ArangoDB - PHP document edge or vertex into a pod .