function check()
 {
     $errorObject = new CopixErrorObject();
     if (strlen($this->worker_id) <= 0) {
         $errorObject->addError('worker_id', CopixI18N::get('copix:dao.errors.required', 'Worker id'));
     }
     if (strlen($this->branch_id) <= 0) {
         $errorObject->addError('branch_id', CopixI18N::get('copix:dao.errors.required', 'Branch id'));
     }
     return $errorObject->isError() ? $errorObject->asArray() : true;
 }
 function check()
 {
     $errorObject = new CopixErrorObject();
     return $errorObject->isError() ? $errorObject->asArray() : true;
 }
 public function testEmpty()
 {
     $object = new CopixErrorObject();
     $this->assertFalse($object->isError());
 }
 /**
  * On passe par toutes les méthodes de validation intermédiaire
  * @param mixed $pValue La propriété à valider
  * @return boolean / CopixErrorObject
  */
 protected function _validate($pValue)
 {
     $toReturn = new CopixErrorObject();
     foreach ($this->_propertiesToCheck() as $propertyName) {
         if (($result = $this->_checkProperty($propertyName, $pValue)) !== true) {
             $toReturn->addErrors(array($propertyName => $result));
         }
     }
     return $toReturn->isError() ? new CopixErrorObject($this->_getMessage($pValue, $toReturn)) : true;
 }