Build a list of all possible attributes.

@return void
509868
public static function buildAttributes($model)
    {
        $result = [];

        self::buildCastedAttributes($model, $result);
        self::buildSearchAttributes($model, $result);

        return $result;
    }
1308354
public function htmlAttr()
    {
        $attributes = [
            'data-template' => $this->templateName(),
            'data-debug'    => $this->debug() ? 'true' : false,
            'lang'          => $this->lang(),
            'locale'        => $this->locale(),
            'class'         => $this->htmlClasses()
        ];

        return html_build_attributes($attributes);
    }
1146397
protected function buildDataSetters()
    {
        $setters = '';

        foreach ($this->columns as $column) {
            $setters .= "\n" . $column->getSetter();
        }

        $this->vars['setters'] = $setters;
    }
403394
private function _buildVitals()
    {
        $vitals = $this->_xml->addChild('Vitals');
        $vitals->addAttribute('Hostname', $this->_sys->getHostname());
        $vitals->addAttribute('IPAddr', $this->_sys->getIp());
        $vitals->addAttribute('Kernel', $this->_sys->getKernel());
        $vitals->addAttribute('Distro', $this->_sys->getDistribution());
        $vitals->addAttribute('Distroicon', $this->_sys->getDistributionIcon());
        $vitals->addAttribute('Uptime', $this->_sys->getUptime());
        $vitals->addAttribute('Users', $this->_sys->getUsers());
        $vitals->addAttribute('LoadAvg', $this->_sys->getLoad());
        if ($this->_sys->getLoadPercent() !== null) {
            $vitals->addAttribute('CPULoad', $this->_sys->getLoadPercent());
        }
        if ($this->_sysinfo->getLanguage() !== null) {
            $vitals->addAttribute('SysLang', $this->_sysinfo->getLanguage());
        }
        if ($this->_sysinfo->getEncoding() !== null) {
            $vitals->addAttribute('CodePage', $this->_sysinfo->getEncoding());
        }

        //processes
        if (($procss = $this->_sys->getProcesses()) !== null) {
            if (isset($procss['*']) && (($procall = $procss['*']) > 0)) {
                $vitals->addAttribute('Processes', $procall);
                if (!isset($procss[' ']) || !($procss[' '] > 0)) { // not unknown
                    $procsum = 0;
                    if (isset($procss['R']) && (($proctmp = $procss['R']) > 0)) {
                        $vitals->addAttribute('ProcessesRunning', $proctmp);
                        $procsum += $proctmp;
                    }
                    if (isset($procss['S']) && (($proctmp = $procss['S']) > 0)) {
                        $vitals->addAttribute('ProcessesSleeping', $proctmp);
                        $procsum += $proctmp;
                    }
                    if (isset($procss['T']) && (($proctmp = $procss['T']) > 0)) {
                        $vitals->addAttribute('ProcessesStopped', $proctmp);
                        $procsum += $proctmp;
                    }
                    if (isset($procss['Z']) && (($proctmp = $procss['Z']) > 0)) {
                        $vitals->addAttribute('ProcessesZombie', $proctmp);
                        $procsum += $proctmp;
                    }
                    if (isset($procss['D']) && (($proctmp = $procss['D']) > 0)) {
                        $vitals->addAttribute('ProcessesWaiting', $proctmp);
                        $procsum += $proctmp;
                    }
                    if (($proctmp = $procall - $procsum) > 0) {
                        $vitals->addAttribute('ProcessesOther', $proctmp);
                    }
                }
            }
        }
        $vitals->addAttribute('OS', PSI_OS);
    }
901941
private function initAttributes() {
    if ($this->attributes == null) {
      $this->attributes = [];
      $this->attributes['byname'] = [];
      $this->attributes['refs'] = [];

      $attributes = $this->getAttributes();
      foreach ($attributes as $attribute) {
        $this->attributes['byname'][$attribute->getName()] = $attribute;
        if ($attribute instanceof ReferenceDescription) {
          $this->attributes['refs'][] = $attribute;
        }
      }
    }
  }
485049
private function parse_attributes()
    {
        foreach ($this->attributes as $key => $value) {
            if (\is_int($key)) {
                $this->attributes[ $value ] = null;
                unset($this->attributes[ $key ]);
            }
        }

        return $this->attributes;
    }
658438
private function build() {

        //Get value
        $selected = null;

        if(true === $this -> filled) {

            if(true === isset($this -> attributes['name'])) {

                if(true === Request :: isPost()) {
                    $selected = Request :: fromPost($this -> attributes['name']);
                }
            }
        }

        //Build select
        $html = '<select';
        
        foreach($this -> attributes as $attribute => $value) {

            if('value' !== $attribute) {
                $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
            }
        }

        $html .= '>';

        //Build options
        foreach($this -> options as $key => $value) {

            if(true === is_array($value)) {

                $html .= '<optgroup label="'. Escape :: attr($key) .'">';

                    foreach($value as $key => $value) {

                        $html .= '<option value="'. Escape :: attr($key) .'"';

                            if($key === $selected) {
                                $html .= ' selected="selected"';
                            }

                        $html .= '>'. Escape :: html($value) .'</option>';
                    }

                $html .= '</optgroup>';
            }
            else {

                $html .= '<option value="'. Escape :: attr($key) .'"';

                    if($key === $selected) {
                        $html .= ' selected="selected"';
                    }

                $html .= '>'. Escape :: html($value) .'</option>';
            }
        }
        
        $html .= '</select>';

        return $html;
    }
401414
public function build()
    {
        $this->isValidField($this->classMetadata, $this->fieldName);

        $this->classMetadata->appendExtension($this->getExtensionName(), [
            'slugs' => [
                $this->fieldName => $this->makeConfiguration(),
            ],
        ]);
    }
499725
protected function autoAssignAttributes()
    {
        $attributes = isset($this->defaultAttributes) ? $this->defaultAttributes : [];
        // Default attributes are not counted as "from storage"
        $this->fillAttributes($attributes, false);
    }
33387
public function build()
    {
        if ($this->builded) {
            return;
        }

        $collection = $this->processFilter(false);

        $data = $collection->toArray();

        $this->prependRowSelectorColumn();
        $this->appendActionsColumn();

        Column::setOriginalGridModels($collection);

        $this->columns->map(function (Column $column) use (&$data) {
            $data = $column->fill($data);

            $this->columnNames[] = $column->getName();
        });

        $this->buildRows($data);

        $this->builded = true;
    }
1076973
protected function initAttributes() {
		$vars = get_object_vars($this->_xml->attributes());
			
		$this->_attributes = empty($vars) ? [] : $vars['@attributes'];
	}
1312701
public function generateDownloadAttributes()
    {
        $attributes = [];
        foreach ($this->model->attributes() as $key) {
            $attributes[$key] = $this->model->getAttributeLabel($key) . ' ('.$key.')';
        }
        
        return $attributes;
    }
871085
public function setAllAttributes()
    {
        $methods            = get_class_methods($this);
        $attributeMethods   = array();

        // Get all attribute related getters
        foreach ($methods as $method) {
            if (strpos($method, 'getAttribute') !== false && $method !== 'getAttributes') {
                $attributeMethods[] = $method;
            }
        }

        // Call all attribute related getters
        foreach ($attributeMethods as $attributeMethod) {
            $name   = strtolower(str_replace('getAttribute', '', $attributeMethod));
            $value  = $this->$attributeMethod();

            $this->_setAttributeProperty($name, $value);
        }

        return $this;
    }
269675
protected function prepareAttributes()
    {

        // laod the callbacks for the actual attribute code
        $callbacks = $this->getCallbacksByType($this->attributeCode);

        // invoke the pre-cast callbacks
        foreach ($callbacks as $callback) {
            $this->attributeValue = $callback->handle($this);
        }

        // load the ID of the product that has been created recently
        $lastEntityId = $this->getPrimaryKey();

        // cast the value based on the backend type
        $castedValue = $this->castValueByBackendType($this->backendType, $this->attributeValue);

        // prepare the attribute values
        return $this->initializeEntity(
            array(
                $this->getPrimaryKeyMemberName() => $lastEntityId,
                MemberNames::ATTRIBUTE_ID       => $this->attributeId,
                MemberNames::VALUE              => $castedValue
            )
        );
    }
1330638
function attributeList()
    {
        return array(
            $this->TimingPointName => true,
            $this->AccumulatorName => true,
            $this->LogName => false,
            $this->TraceName => true
        );
    }
499968
public function build()
    {
        foreach ($this->events as $event => $listeners) {
            foreach ($listeners as $listener) {
                $this->builder->getClassMetadata()->addEntityListener($event, $listener['class'], $listener['method']);
            }
        }
    }
532504
private function getAttributes()
    {
        $attributes = array();
        
        foreach ( $this->_columns as $column )
        {
            $attributes[$column["name"]] = $this->{$column["name"]};
        }
        
        return $attributes;
    }