Define uma pagina notfoud
@param callable $fnc
514856
public function notFound($fnc)
    {
        if (is_callable($fnc)) {
            if ($fnc instanceof \Closure) {
                $this->notFoundModified = $fnc;
            } else {
                $this->addedExceptions['\InvalidArgumentException'] = 'O callable do metodo notFound deve ser um closure!';
            }
        } else {
            $this->addedExceptions['\InvalidArgumentException'] = 'App::notFound, callable invalido';
        }
    }
1288618
public function index($slug1, $slug2 = null, $slug3 = null)
    {
        $url = $this->getCurrentUrl();

        $page = Page::with('components.component')->where('url', $url)->first();
        if (!$page) {
            throw new NotFoundHttpException();
        }

        // find out if its a 'main page' and get the children
        $children = $this->findChildrenPages($page);

        return $this->view('titan::pages.page')
            ->with('activePage', $page)
            ->with('childrenPages', $children);
    }
178881
function cmd_RNFR($fd, $cmd)
    {
        $user = $this->getUser($fd);
        $file = $this->fillDirName($user, $cmd[1]);
        if (!file_exists($file))
        {
            $this->send($fd, "550 Sorry, but that file doesn't exist");
        }
        else
        {
            $this->users[$user]['rename'] = $file;
            $this->send($fd, "350 RNFR accepted - file exists, ready for destination");
        }
    }
466070
static function p($allowAbstract, \Closure $f) {
		/** @var bool $prev */
		$prev = self::$allow_abstract;
		self::$allow_abstract = $allowAbstract;
		try {return $f();}
		finally {self::$allow_abstract = $prev;}
	}
651788
public static function macro($name, callable $fn)
    {
        if (!in_array($name, self::$_rulesMap)) {
            self::$_rulesMap[$name] = $fn;
            return true;
        }

        return false;
    }
863862
function each (callable $fn)
  {
    foreach ($this->getIterator () as $k => $v)
      if ($fn ($v, $k) === false) break;
    return $this;
  }
1174124
public function setPageNotFoundTargetUseURI(string $page_not_found_target_use_uri = "N") : CNabuDataObject
    {
        if ($page_not_found_target_use_uri === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$page_not_found_target_use_uri")
            );
        }
        $this->setValue('nb_site_page_not_found_target_use_uri', $page_not_found_target_use_uri);
        
        return $this;
    }
672802
function (fnc, scope) {
            scope = scope || this;

            for (var i = 0; i < this.$items.length; i++) {
                fnc.call(scope, this.$items[i], i, this.$items);
            }
        }
9207
final public function instanceof(string $fqcn): InstanceofConfigurator
    {
        $this->instanceof[$fqcn] = $definition = new ChildDefinition('');

        return new InstanceofConfigurator($this, $definition, $fqcn, $this->path);
    }
1156649
public function paginate($num = 15)
	{
		$page = (int) Input::get('page', 1);
		
		$this->limit($num, ($page - 1) * $num);
		
		return new LengthAwarePaginator($this->get(), $this->count(), $num, $page);
	}
1154797
public function map(callable $f) {
        return !$this->isEmpty() ? Option::just($f($this->get())) : Option::none();
    }
1097127
public function fn($id, $callable = null, $needsContainer = false)
    {
        if ($callable === null) {
            $callable = $id;
        }
        if (!is_callable($callable)) {
            throw new \InvalidArgumentException("Not callable");
        }
        $this->set($id, array($callable, $needsContainer));
    }
189932
public function onPagePublicUrl(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof PageInterface) {
            return;
        }

        $event->stopPropagation();

        if (!$resource->isEnabled() || $resource->isDynamicPath()) {
            return;
        }

        $event->addData('route', $resource->getRoute());
    }
1125016
public function setFQN($fqn) {
    if (FALSE !== ($pos = mb_strrpos($fqn,'\\'))) {
      $this->namespace = ltrim(mb_substr($fqn, 0, $pos+1), '\\'); // +1 to add the trailing slash, see setNamespace
      $this->setName(mb_substr($fqn, $pos));
    } else {
      $this->namespace = NULL;
      $this->setName($fqn);
    }
  }
451930
public function when($condition, callable $call, callable $notCall = null)
    {
        if (is_callable($condition)) {
            $result = call_user_func($condition);
        } else {
            $result = $condition;
        }
        if ($result) {
            call_user_func_array($call, [$this]);
        } else {
            if ($notCall) {
                call_user_func_array($notCall, [$this]);
            }
        }
        return $this;
    }
541921
public function filter(callable $fn)
    {
        $this->items = array_values(array_filter($this->items, $fn));

        return $this;
    }
1184116
public static function createFromNotFound(NotFound $notFound, $destination, $permanent = true)
    {
        return new static($notFound->getPath(), $destination, $permanent);
    }