protected function checkTraitInjections($traitName)
    {
        if(isset($this->traitsInjections[$traitName])) {
            $reflection = new \ReflectionClass($this);
            foreach($this->traitsInjections[$traitName] as $propertyName) {
                if(!$reflection->hasProperty($propertyName) || !$this->$propertyName) {
                    throw new \Exception(sprintf('Class %s uses %s trait but %s property has not been injected', $this->buildClassName($this->name), $traitName, $propertyName));
                }
            }
        }
    }
protected function checkTraitInjections($traitName)
    {
        if(isset($this->traitsInjections[$traitName])) {
            $reflection = new \ReflectionClass($this);
            foreach($this->traitsInjections[$traitName] as $propertyName) {
                if(!$reflection->hasProperty($propertyName) || !$this->$propertyName) {
                    throw new \Exception(sprintf('Class %s uses %s trait but %s property has not been injected', $this->buildClassName($this->name), $traitName, $propertyName));
                }
            }
        }
    }
protected function checkTraitInjections ( $ traitName ) { if ( isset ( $ this -> traitsInjections [ $ traitName ] ) ) { $ reflection = new \ ReflectionClass ( $ this ) ; foreach ( $ this -> traitsInjections [ $ traitName ] as $ propertyName ) { if ( ! $ reflection -> hasProperty ( $ propertyName ) || ! $ this -> $ propertyName ) { throw new \ Exception ( sprintf ( 'Class %s uses %s trait but %s property has not been injected' , $ this -> buildClassName ( $ this -> name ) , $ traitName , $ propertyName ) ) ; } } } }
Checks whether required objects for a trais have been injected
@param string $traitName
Checks whether required objects for a trais have been injected