Ejemplo n.º 1
0
 /**
  * Determine the cache key used to retrieve the given entity from the cache
  *
  * @param PropertyContainer $entity
  * @return string 
  */
 protected function getEntityCacheKey(PropertyContainer $entity)
 {
     if ($entity instanceof Node) {
         return 'node-' . $entity->getId();
     } else {
         if ($entity instanceof Relationship) {
             return 'relationship-' . $entity->getId();
         }
     }
     throw new Exception('Unknown entity type: ' . get_class($entity));
 }
Ejemplo n.º 2
0
 /**
  * Create a new database Schema manager.
  *
  * @param  \Illuminate\Database\Connection  $connection
  * @return void
  */
 public function __construct(Client $connection)
 {
     $this->connection = $connection;
     parent::__construct($connection);
     //$this->grammar = $connection->getSchemaGrammar();
 }