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;
    }
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;
    }
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 ; }
Sets all attributes. Calls all methods that start with 'getAttribute'.

@return self
Sets all attributes . Calls all methods that start with getAttribute .