FOF30\Model\DataModel::findOrFail PHP Метод

findOrFail() публичный Метод

Find and load a single record based on the provided key values. If the record is not found an exception is thrown
public findOrFail ( array | mixed $keys = null ) : static
$keys array | mixed An optional primary key value to load the row by, or an array of fields to match. If not set the "id" state variable or, if empty, the identity column's value is used
Результат static Self, for chaining
    public function findOrFail($keys = null)
    {
        $this->find($keys);
        // We have to assign the value, since empty() is not triggering the __get magic method
        // http://stackoverflow.com/questions/2045791/php-empty-on-get-accessor
        $value = $this->getId();
        if (empty($value)) {
            throw new RecordNotLoaded();
        }
        return $this;
    }