@param Application $application
@param             $status

@return AddressList
967915
protected function getRecipient(Application $application, $status)
    {
        $recipient = Status::ACCEPTED == $status
            ? $application->getJob()->getUser()->getInfo()
            : $application->getContact();

        $email = $recipient->getEmail();
        $name  = $recipient->getDisplayName(false);

        return $name ? [ $email => $name ] : [ $email ];
    }
962348
public function statusExist($status)
    {
        $generator = $this->getStatuses();
        $list = iterator_to_array($generator);

        return in_array($status, $list);
    }
718998
public function getApp(ApiApplication $application)
    {
        $user = $this->getAuthenticatedUser();
        $account = $this->getApiAccountRepository()->findByUserAndApplication($user, $application);
        $token = $account
            ? $this->getApiOAuthTokenRepository()->findDeveloperToken($account)
            : null;

        if (! $account) {
            throw new AccessDeniedHttpException();
        }

        $deliveries = $this->getWebhookDeliveryRepository()
            ->findLastDeliveries($account->getApplication(), 10);

        return $this->render('developers/application.html.twig', [
            "application" => $application,
            "deliveries"  => $deliveries,
            "user"        => $user,
            "token"       => $token,
        ]);
    }
1121490
public function list($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK')
    {
        $params = [
            'offset' => $offset,
            'count' => $count,
            'status_list' => $statusList,
        ];

        return $this->httpPostJson('card/batchget', $params);
    }
746746
function canModifyStatus( $statusID, $user = false )
    {
        if ( $user === false )
            $user = eZUser::currentUser();
        else if ( is_numeric( $user ) )
            $user = eZUser::fetch( $user );

        if ( !is_object( $user ) )
        {
            eZDebug::writeError( "Cannot check status access without a user", __METHOD__ );
            return false;
        }

        $accessResult = $user->hasAccessTo( 'shop' , 'setstatus' );
        $accessWord = $accessResult['accessWord'];
        $access = false;

        $currentStatusID = $this->attribute( "status_id" );

        if ( $accessWord == 'yes' )
            $access = true;

        if ( $accessWord == 'limited' )
        {
            $limitationList = $accessResult['policies'];
            $access = true;
            foreach ( $limitationList as $pid => $limit )
            {
                $access = true;
                foreach ( $limit as $name => $value )
                {
                    if ( $name == 'FromStatus' )
                    {
                        if ( !in_array( $currentStatusID, $value )  )
                            $access = false;
                    }
                    if ( $name == 'ToStatus' )
                    {
                        if ( !in_array( $statusID, $value ) )
                            $access = false;
                    }
                    if ( !$access )
                        break;
                }
                if ( $access )
                    break;
            }
        }
        return $access;
    }
932599
public static function view($view, $data = array(), $status = 200, array $headers = array())
	{
		$app = Facade::getFacadeApplication();

		return static::make($app['view']->make($view, $data), $status, $headers);
	}
1022885
protected function redirect($location = null, $statusCode = 302)
    {
        return $this->response->redirect(url($location), true, $statusCode);
    }
1019699
public Collection<ApplicationHost> list(long applicationId, List<String> queryParams)
    {
        return HTTP.GET(String.format("/v2/applications/%d/hosts.json", applicationId), null, queryParams, APPLICATION_HOSTS).get();
    }
1219599
public function connect(Application $app)
    {
        /**
         * @var ControllerCollection $collection
         */
        $collection = $app['controllers_factory'];
        $collection
            ->match('/', Controller::INDEX . ':indexAction')
            ->method('GET')
            ->value('template', 'pages/landing');
        $collection
            ->match('/account/login', Controller::INDEX . ':indexAction')
            ->method('POST')
            ->value('template', 'pages/landing');
        $collection
            ->match('/account/create', Controller::ACCOUNT . ':indexAction')
            ->method('POST|GET')
            ->value('template', 'pages/registration');
        $collection
            ->match('/game', Controller::INDEX . ':indexAction')
            ->method('GET')
            ->value('template', 'pages/landing');
        $collection
            ->match('/cities',Controller::CITY.':listAction')
            ->method('GET')
            ->value('template','pages/game/cityList');
        $collection
            ->match('/city/create',Controller::CITY.':createAction')
            ->method('GET')
            ->value('template','pages/game/newcity');


        return $collection;
    }
83685
public function lists($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK')
    {
        $params = [
            'offset'      => $offset,
            'count'       => $count,
            'status_list' => $statusList,
        ];

        return $this->parseJSON('json', [self::API_LIST_CARD, $params]);
    }
151095
public function index($page = null, $status = null)
    {
        $url = sprintf('buckets/%d/schedules/%d/entries.json', $this->bucket, $this->parent);

        $entries = $this->client->get($url, [
            'query' => [
                'page' => $page,
            ],
        ]);

        return $this->indexResponse($entries, ScheduleEntry::class);
    }
255595
public function listModifierLists($location_id)
    {
        list($response, $statusCode, $httpHeader) = $this->listModifierListsWithHttpInfo ($location_id);
        return $response; 
    }
1357028
public function status($status, array $args = []): PostTypeInterface
    {
        if (is_array($status)) {
            foreach ($status as $key => $params) {
                if (is_int($key)) {
                    $this->status($params);
                } elseif (is_string($key) && is_array($params)) {
                    $this->status($key, $params);
                }
            }

            return $this;
        }

        $this->prepareStatus($status, $args);

        return $this;
    }
1021582
public static function endpointsInfo(Application $app)
    {
        $app->boot();

        /** @var ControllerCollection $controllers */
        $controllers = $app['controllers'];
        $rControllers = new ReflectionObject($controllers);
        $pControllers = $rControllers->getProperty('controllers');
        $pControllers->setAccessible(true);

        /** @var Controller $ctrl */
        foreach ($pControllers->getValue($controllers) as $ctrl) {
            if ($ctrl instanceof Controller) {
                $route = $ctrl->getRoute();

                foreach ($route->getMethods() as $method) {
                    echo '- ' . str_pad($method, 7) . ' ' . str_pad($route->getPath(), 70);

                    if ($service = $route->getDefault('_controller')) {
                        if (is_scalar($service)) {
                            echo 'Handler: ' . $service;
                        }
                    }

                    echo "\n";
                }
            }
        }
    }
511949
static function fetchNotificationList( $status = 1, $length = null, $offset = 0, $sorts = null )
    {
        $cond = array();
        if ( is_null( $status ) )
        {
            $cond = null;
        }
        else
        {
        $cond['status'] = $status;
        }
        $limit = array();
        if ( is_null( $length ) )
        {
            $limit = null;
        }
        else
        {
            $limit['offset'] = $offset;
            $limit['length'] = $length;
        }
        return eZPersistentObject::fetchObjectList( self::definition(), null, $cond, $sorts, $limit );
    }
50516
public function deleteApp(Request $request, ApiApplication $application)
    {
        $this->assertJsonRequestFormat($request);

        $this->getApiApplicationManipulator()->delete($application);

        return $this->app->json(['success' => true]);
    }
163984
public function GetSolutionDirectoryList(\Puzzlout\Framework\Core\Application $app) {
        $Cacher = \Puzzlout\Framework\Core\Cache\BaseCache::Init($app->config);
        //$Cacher->Remove(CacheKeys::SOLUTION_FOLDERS);
        if (!$Cacher->KeyExists(CacheKeys::SOLUTION_FOLDERS)) {
            $SolutionPathListArray = ArrayFilterDirectorySearch::Init($app)->RecursiveScanOf(
                    "APP_ROOT_DIR", \Puzzlout\Framework\Core\DirectoryManager\Algorithms\ArrayListAlgorithm::ExcludeList());
            $Cacher->Create(CacheKeys::SOLUTION_FOLDERS, $SolutionPathListArray);
        } else {
            $SolutionPathListArray = $Cacher->Read(CacheKeys::SOLUTION_FOLDERS, array());
        }
        return $SolutionPathListArray;
    }