Jarves\Configuration\Model::__construct PHP Method

__construct() public method

public __construct ( DOMElement | array | string $values = null, Jarves $jarves = null )
$values DOMElement | array | string
$jarves Jarves\Jarves
    public function __construct($values = null, Jarves $jarves = null)
    {
        $this->initialize($values, $jarves);
    }

Usage Example

Esempio n. 1
0
 /**
  * @param string|BundleInterface $bundleClass
  * @param \DOMElement $bundleDoc
  * @param null $jarves
  */
 public function __construct($bundleClass, $jarves = null, \DOMElement $bundleDoc = null)
 {
     if (!$bundleClass) {
         throw new \InvalidArgumentException('$bundleClass needs to be set.');
     }
     parent::__construct(null, $jarves);
     $this->element = $bundleDoc;
     if ($bundleClass instanceof BundleInterface) {
         $bundleClass = get_class($bundleClass);
     }
     $this->bundleClass = $bundleClass;
     $this->bundleName = $bundleClass;
     if (false !== ($pos = strrpos($bundleClass, '\\'))) {
         $this->bundleName = substr($bundleClass, $pos + 1);
     }
     $this->rootName = 'bundle';
     $this->setJarves($jarves);
 }