relationType() public static method

Checking that relation type is correct
public static relationType ( string $type ) : boolean
$type string
return boolean relation type
コード例 #1
0
ファイル: Relation.php プロジェクト: greg0/lazer-database
 /**
  * Set relation type to field
  * @param string $relation Name of relation
  */
 protected function setRelationType($relation)
 {
     Validate::relationType($relation);
     $this->relationType = $relation;
 }
コード例 #2
0
ファイル: ValidateTest.php プロジェクト: greg0/lazer-database
 /**
  * @covers Lazer\Classes\Helpers\Validate::relationType
  * @expectedException Lazer\Classes\LazerException
  */
 public function testRelationTypeNotExists()
 {
     $this->object->relationType('someRelation');
 }