load() public static method

Load or create schema object and cache it.
public static load ( string $class ) : LazyRecord\Schema\RuntimeSchema
$class string Schema class naem
return LazyRecord\Schema\RuntimeSchema
Beispiel #1
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('User\\Model\\UserSchemaProxy');
 }
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('ProductBundle\\Model\\ProductFileSchemaProxy');
 }
Beispiel #3
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('OrderBundle\\Model\\OrderItemSchemaProxy');
 }
Beispiel #4
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('LazyRecord\\Model\\MetadataSchemaProxy');
 }
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     } elseif (@constant('static::SCHEMA_PROXY_CLASS')) {
         return $this->_schema = SchemaLoader::load(static::SCHEMA_PROXY_CLASS);
     }
     throw new RuntimeException('schema is not defined in ' . get_class($this));
 }
Beispiel #6
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     } elseif (@constant('static::SCHEMA_PROXY_CLASS')) {
         // the SCHEMA_PROXY_CLASS is from the *Base.php file.
         if ($this->_schema = SchemaLoader::load(static::SCHEMA_PROXY_CLASS)) {
             return $this->_schema;
         }
         throw new Exception("Can not load " . static::SCHEMA_PROXY_CLASS);
     }
     throw new RuntimeException("schema is not defined in " . get_class($this));
 }
Beispiel #7
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     } elseif (@constant('static::schema_proxy_class')) {
         return $this->_schema = SchemaLoader::load(static::schema_proxy_class);
     }
     throw new RuntimeException("schema is not defined in " . get_class($this));
 }