/** * This method returns whether the specified value is "empty" (i.e. "null", "undefined", or a string * of length "0"). * * @access public * @static * @param mixed $value the value to be evaluated * @return boolean whether the value is "empty" */ public static function isEmpty($value) { return $value === null || Core\Data\Undefined::instance()->__equals($value) || Common\String::isTypeOf($value) && $value == ''; }
/** * This constructor initializes the class with the specified URI. * * @access public * @param string $uri the URI to the file * @throws Throwable\InvalidArgument\Exception indicates a data type mismatch */ public function __construct($uri) { $this->name = null; $this->path = null; $this->ext = null; if (!Common\String::isTypeOf($uri)) { throw new Throwable\InvalidArgument\Exception('Unable to handle argument. Argument must be a string, but got :type.', array(':type' => gettype($uri))); } $this->uri = preg_replace('/^classpath:/i', Bootstrap::rootPath(), $uri, 1); $this->temporary = false; }