protected function buildModificationsFromDirty()
    {
        foreach ($this->getDirty() as $attribute => $values) {
            // Make sure values is always an array.
            $values = (is_array($values) ? $values : [$values]);

            // Create a new modification.
            $modification = $this->newBatchModification($attribute, null, $values);

            if (array_key_exists($attribute, $this->original)) {
                // If the attribute we're modifying has an original value, we'll give the
                // BatchModification object its values to automatically determine
                // which type of LDAP operation we need to perform.
                $modification->setOriginal($this->original[$attribute]);
            }

            // Build the modification from its
            // possible original values.
            $modification->build();

            if ($modification->isValid()) {
                // Finally, we'll add the modification to the model.
                $this->addModification($modification);
            }
        }

        return $this->modifications;
    }
protected function buildModificationsFromDirty()
    {
        foreach ($this->getDirty() as $attribute => $values) {
            // Make sure values is always an array.
            $values = (is_array($values) ? $values : [$values]);

            // Create a new modification.
            $modification = $this->newBatchModification($attribute, null, $values);

            if (array_key_exists($attribute, $this->original)) {
                // If the attribute we're modifying has an original value, we'll give the
                // BatchModification object its values to automatically determine
                // which type of LDAP operation we need to perform.
                $modification->setOriginal($this->original[$attribute]);
            }

            // Build the modification from its
            // possible original values.
            $modification->build();

            if ($modification->isValid()) {
                // Finally, we'll add the modification to the model.
                $this->addModification($modification);
            }
        }

        return $this->modifications;
    }
protected function buildModificationsFromDirty ( ) { foreach ( $ this -> getDirty ( ) as $ attribute => $ values ) { // Make sure values is always an array. $ values = ( is_array ( $ values ) ? $ values : [ $ values ] ) ; // Create a new modification. $ modification = $ this -> newBatchModification ( $ attribute , null , $ values ) ; if ( array_key_exists ( $ attribute , $ this -> original ) ) { // If the attribute we're modifying has an original value, we'll give the // BatchModification object its values to automatically determine // which type of LDAP operation we need to perform. $ modification -> setOriginal ( $ this -> original [ $ attribute ] ) ; } // Build the modification from its // possible original values. $ modification -> build ( ) ; if ( $ modification -> isValid ( ) ) { // Finally, we'll add the modification to the model. $ this -> addModification ( $ modification ) ; } } return $ this -> modifications ; }
Builds the models modifications from its dirty attributes.

@return array
Builds the models modifications from its dirty attributes .