opensrs\Exception::classNotFound PHP Method

classNotFound() public static method

public static classNotFound ( $class )
    public static function classNotFound($class)
    {
        throw new self("The class {$class} does not exist or cannot be found");
    }

Usage Example

Example #1
0
 public function loadChangeTypeClass($change_type)
 {
     $changeTypeClassName = $this->getFriendlyClassName($change_type);
     $changeTypeClass = "\\opensrs\\domains\\bulkchange\\changetype\\{$changeTypeClassName}";
     if (class_exists($changeTypeClass)) {
         return new $changeTypeClass();
     } else {
         Exception::classNotFound($changeTypeClass);
     }
 }