Class Socialveo\WebApi\Controllers\RestApiController

InheritanceSocialveo\WebApi\Controllers\RestApiController » Phalcon\Mvc\Controller
Uses TraitsSocialveo\Core\Translatable
SubclassesSocialveo\WebApi\Controllers\ChatController, Socialveo\WebApi\Controllers\CirclesController, Socialveo\WebApi\Controllers\CommentsController, Socialveo\WebApi\Controllers\ConnectionsController, Socialveo\WebApi\Controllers\EmotionsController, Socialveo\WebApi\Controllers\IndexController, Socialveo\WebApi\Controllers\KarmaController, Socialveo\WebApi\Controllers\LocationsController, Socialveo\WebApi\Controllers\MediaController, Socialveo\WebApi\Controllers\NetworksController, Socialveo\WebApi\Controllers\NotificationsController, Socialveo\WebApi\Controllers\PaymentsController, Socialveo\WebApi\Controllers\PostsController, Socialveo\WebApi\Controllers\SearchController, Socialveo\WebApi\Controllers\SocialProfilesController, Socialveo\WebApi\Controllers\SpamController, Socialveo\WebApi\Controllers\StaticPagesController, Socialveo\WebApi\Controllers\TagAssociationsController, Socialveo\WebApi\Controllers\TagsController, Socialveo\WebApi\Controllers\UserBlocksController, Socialveo\WebApi\Controllers\UsersController

Class RestApiController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
_handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
_t() Gets translations Socialveo\Core\Translatable
afterExecuteRoute() After execute route, change return value to json Socialveo\WebApi\Controllers\RestApiController
beforeExecuteRoute() Before execute route, remove extra params Socialveo\WebApi\Controllers\RestApiController
checkClientCredentials() Checks client credentials Socialveo\WebApi\Controllers\RestApiController
decrypt() Decrypt value Socialveo\WebApi\Controllers\RestApiController
encrypt() Encrypt value Socialveo\WebApi\Controllers\RestApiController
getArrayFromParam() Returns array from params Socialveo\WebApi\Controllers\RestApiController
getLanguage() Gets language code Socialveo\WebApi\Controllers\RestApiController
getParams() Gets request params for Socialveo::filteredFind() Socialveo\WebApi\Controllers\RestApiController
getRequestData() Returns request data Socialveo\WebApi\Controllers\RestApiController
getRequiredParam() Get required param Socialveo\WebApi\Controllers\RestApiController
getToken() Get token Socialveo\WebApi\Controllers\RestApiController
getTranslation() Gets translations Socialveo\WebApi\Controllers\RestApiController
handleError() Handle errors Socialveo\WebApi\Controllers\RestApiController
handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
initialize() Initialize controller Socialveo\WebApi\Controllers\RestApiController
invalidMethodAction() Action trigger when invalid action tried run Socialveo\WebApi\Controllers\RestApiController
notFoundAction() Not found action Socialveo\WebApi\Controllers\RestApiController
posts() Gets posts Socialveo\WebApi\Controllers\RestApiController
replaceParam() Replace param Socialveo\WebApi\Controllers\RestApiController
respondWithItem() Response with item // * @deprecated Socialveo\WebApi\Controllers\RestApiController
sendJsonContent() Send response as json content and exit Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRaw() Send json content Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRawStatic() Send json content static Socialveo\WebApi\Controllers\RestApiController
setDefaultParam() Set default option Socialveo\WebApi\Controllers\RestApiController
t() Gets translations Socialveo\Core\Translatable
unsetParam() Unset get param Socialveo\WebApi\Controllers\RestApiController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkAccess() Checks during the init of controller whether user is a guest. Socialveo\WebApi\Controllers\RestApiController
log() Log full request data for debug Socialveo\WebApi\Controllers\RestApiController
objectsToArray() Convert objects to arrays Socialveo\WebApi\Controllers\RestApiController

Property Details

$countTotal protected property
protected integer $countTotal null
$logger protected property
$mail protected property
protected \Phalcon\Mailer\Manager $mail null
$network protected property
$profileUser protected property
$showCount protected property
protected boolean $showCount false
$status protected property
protected string|null $status null

Method Details

_handleException() public method

Handle exceptions

public void _handleException ( $e )
$e Exception
afterExecuteRoute() public method

After execute route, change return value to json

public void afterExecuteRoute ( $dispatcher )
$dispatcher Socialveo\Core\Dispatcher
beforeExecuteRoute() public method

Before execute route, remove extra params

public void beforeExecuteRoute ( $dispatcher )
$dispatcher Socialveo\Core\Dispatcher
checkAccess() protected method

Checks during the init of controller whether user is a guest.

protected boolean|mixed checkAccess ( )
checkClientCredentials() public method

Checks client credentials

public boolean checkClientCredentials ( )
decrypt() public method (available since version 1.0)

Decrypt value

public string decrypt ( $crypted, $key )
$crypted string
$key string
encrypt() public method (available since version 1.0)

Encrypt value

public string encrypt ( $value, $key )
$value string
$key string
getArrayFromParam() public method

Returns array from params

public array|mixed getArrayFromParam ( $name )
$name string
getLanguage() public method

Gets language code

public string getLanguage ( )
getParams() public method

Gets request params for Socialveo::filteredFind()

public array getParams ( $allow null )
$allow array

[optional]

throws Exception
getRequestData() public method

Returns request data

public array getRequestData ( )
getRequiredParam() public method

Get required param

public mixed getRequiredParam ( $name )
$name string

Param name

getToken() public method

Get token

public string|null getToken ( $require false )
$require boolean

[optional]

getTranslation() public method

Gets translations

public Socialveo\Core\library\Gettext getTranslation ( )
handleError() public static method

Handle errors

public static boolean|void handleError ( $errno, $errstr, $errfile, $errline, $errcontext )
$errno integer
$errstr string
$errfile string
$errline integer
$errcontext string
handleException() public static method

Handle exceptions

public static void handleException ( $e )
$e Exception
initialize() public method

Initialize controller

public mixed|void initialize ( )
invalidMethodAction() public method

Action trigger when invalid action tried run

public string invalidMethodAction ( $methods )
$methods string
throws Exception
log() protected method

Log full request data for debug

protected void log ( )
notFoundAction() public method

Not found action

public string|array notFoundAction ( )
objectsToArray() protected method

Convert objects to arrays

protected array|mixed objectsToArray ( $array, &$parent = [] )
$array mixed
$parent array

[optional]

posts() public method

Gets posts

public Phalcon\Http\Response|Phalcon\Http\ResponseInterface posts ( $networks null, $criteria null )
$networks array|Socialveo\Core\models\Network|null
$criteria Socialveo\Core\Criteria
replaceParam() public method

Replace param

public void replaceParam ( $name, $value )
$name string
$value string
respondWithItem() public method

Response with item // * @deprecated

public mixed respondWithItem ( $object )
$object mixed
sendJsonContent() public method

Send response as json content and exit

public void sendJsonContent ( $data = [], $wrapToData false )
$data array

[optional]

$wrapToData boolean
sendJsonContentRaw() public method

Send json content

public void sendJsonContentRaw ( $data )
$data array
sendJsonContentRawStatic() public static method

Send json content static

public static void sendJsonContentRawStatic ( $data )
$data array
setDefaultParam() public method

Set default option

public void setDefaultParam ( $name, $value )
$name string
$value string
unsetParam() public method

Unset get param

public void unsetParam ( $name )
$name