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
Example #1
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('User\\Model\\UserSchemaProxy');
 }
Example #2
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('ProductBundle\\Model\\ProductFileSchemaProxy');
 }
Example #3
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('OrderBundle\\Model\\OrderItemSchemaProxy');
 }
Example #4
0
 public function getSchema()
 {
     if ($this->_schema) {
         return $this->_schema;
     }
     return $this->_schema = SchemaLoader::load('LazyRecord\\Model\\MetadataSchemaProxy');
 }
Example #5
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));
 }
Example #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));
 }
Example #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));
 }