protected function validate($object)
    {
        $object = (object) $object;

        if ($object instanceof $this->is) {
            return $object;
        }

        throw new \DomainException(
            sprintf(
                "The Asset advertised as being of type %s is actually of type %s",
                $this->is,
                get_class($object)
            )
        );
    }
protected function validate($object)
    {
        $object = (object) $object;

        if ($object instanceof $this->is) {
            return $object;
        }

        throw new \DomainException(
            sprintf(
                "The Asset advertised as being of type %s is actually of type %s",
                $this->is,
                get_class($object)
            )
        );
    }
protected function validate ( $ object ) { $ object = ( object ) $ object ; if ( $ object instanceof $ this -> is ) { return $ object ; } throw new \ DomainException ( sprintf ( "The Asset advertised as being of type %s is actually of type %s" , $ this -> is , get_class ( $ object ) ) ) ; }
Validate that this object is what it advertises.

@param object
Validate that this object is what it advertises .