name = $name; } /** * Get public routes * * @return array $public_routes all public route with namespace */ public function get_public_routes() { return array_map( function ( $value ) { return $this->name . $value; }, $this->public_routes ); } /** * Verify if some rote is public or not * * @param string $route The route that route being accessed. * * @return bool */ public function is_public_route( $route ) { return in_array( $route, $this->get_public_routes(), true ); } }