lib/PHPPdf/Core/Document.php
public function getComplexAttributes(AttributeBag $bag)
    {
        $complexAttributes = array();

        if($this->complexAttributeFactory !== null)
        {
            foreach($bag->getAll() as $id => $parameters)
            {
                if(!isset($parameters['name']))
                {
                    throw new InvalidArgumentException('"name" attribute is required.');
                }

                $name = $parameters['name'];
                unset($parameters['name']);
                
                $complexAttribute = $this->complexAttributeFactory->create($name, $parameters);
                
                if(!$complexAttribute->isEmpty())
                {
                    $complexAttributes[] = $complexAttribute;
                }
            }
        }

        return $complexAttributes;
    }
public function getComplexAttributes(AttributeBag $bag)
    {
        $complexAttributes = array();

        if($this->complexAttributeFactory !== null)
        {
            foreach($bag->getAll() as $id => $parameters)
            {
                if(!isset($parameters['name']))
                {
                    throw new InvalidArgumentException('"name" attribute is required.');
                }

                $name = $parameters['name'];
                unset($parameters['name']);
                
                $complexAttribute = $this->complexAttributeFactory->create($name, $parameters);
                
                if(!$complexAttribute->isEmpty())
                {
                    $complexAttributes[] = $complexAttribute;
                }
            }
        }

        return $complexAttributes;
    }
public function getComplexAttributes ( AttributeBag $ bag ) { $ complexAttributes = array ( ) ; if ( $ this -> complexAttributeFactory !== null ) { foreach ( $ bag -> getAll ( ) as $ id => $ parameters ) { if ( ! isset ( $ parameters [ 'name' ] ) ) { throw new InvalidArgumentException ( '"name" attribute is required.' ) ; } $ name = $ parameters [ 'name' ] ; unset ( $ parameters [ 'name' ] ) ; $ complexAttribute = $ this -> complexAttributeFactory -> create ( $ name , $ parameters ) ; if ( ! $ complexAttribute -> isEmpty ( ) ) { $ complexAttributes [ ] = $ complexAttribute ; } } } return $ complexAttributes ; }
Create complexAttributes objects depends on bag content

@return array Array of ComplexAttribute objects
Create complexAttributes objects depends on bag content