public function add(ModelObject $obj)
    {
        $obj->CreationDate = $this->DateFactory->newStorageDate();
        if(!$obj->hasModifiedDate())
            $obj->ModifiedDate = $this->DateFactory->newStorageDate();

        $this->validator->validateFor(__FUNCTION__, $obj)->throwOnError();

        return $this->dao->add($obj);
    }
public function add(ModelObject $obj)
    {
        $obj->CreationDate = $this->DateFactory->newStorageDate();
        if(!$obj->hasModifiedDate())
            $obj->ModifiedDate = $this->DateFactory->newStorageDate();

        $this->validator->validateFor(__FUNCTION__, $obj)->throwOnError();

        return $this->dao->add($obj);
    }
public function add ( ModelObject $ obj ) { $ obj -> CreationDate = $ this -> DateFactory -> newStorageDate ( ) ; if ( ! $ obj -> hasModifiedDate ( ) ) $ obj -> ModifiedDate = $ this -> DateFactory -> newStorageDate ( ) ; $ this -> validator -> validateFor ( __FUNCTION__ , $ obj ) -> throwOnError ( ) ; return $ this -> dao -> add ( $ obj ) ; }
Performs an INSERT for the given ModelObject through our DAO.
CreationDate and ModifiedDate are set, and the validator is run,

Validation errors will throw a ValidationException

@param ModelObject $obj The Object to Add

@return mixed See the add() method of our DAO
Performs an INSERT for the given ModelObject through our DAO . CreationDate and ModifiedDate are set and the validator is run