src/TSFlaggedActiveRecord.php
public function getAttributes($names = null) {
        $attributes = parent::getAttributes($names);
        if (is_array($names)) {
            $flags = $this->cachedFlags();
            $flagNames = array_intersect(array_keys($flags), $names);
            foreach ($flagNames as $name) {
                $attributes[$name] = $this->getFlag($flags[$name]);
            }
        }
        return $attributes;
    }
public function getAttributes($names = null) {
        $attributes = parent::getAttributes($names);
        if (is_array($names)) {
            $flags = $this->cachedFlags();
            $flagNames = array_intersect(array_keys($flags), $names);
            foreach ($flagNames as $name) {
                $attributes[$name] = $this->getFlag($flags[$name]);
            }
        }
        return $attributes;
    }
public function getAttributes ( $ names = null ) { $ attributes = parent :: getAttributes ( $ names ) ; if ( is_array ( $ names ) ) { $ flags = $ this -> cachedFlags ( ) ; $ flagNames = array_intersect ( array_keys ( $ flags ) , $ names ) ; foreach ( $ flagNames as $ name ) { $ attributes [ $ name ] = $ this -> getFlag ( $ flags [ $ name ] ) ; } } return $ attributes ; }
Returns all attribute and flags values.
@param array $names list of attributes whose value needs to be returned.
Defaults to null, meaning all attributes as listed in {@link attributeNames} and flags as listed in
{@link flagNames} will be returned. If it is an array, only the attributes in the array will be returned.
@return array attribute values (name=>value).
Returns all attribute and flags values .