src/Common/Model/Base.php
public function search($sKeywords, $iPage = null, $iPerPage = null, array $aData = [], $bIncludeDeleted = false)
    {
        //  If the second parameter is an array then treat as if called with search($sKeywords, null, null, $aData);
        if (is_array($iPage)) {
            $aData = $iPage;
            $iPage = null;
        }

        $this->applySearchConditionals($aData, $sKeywords);

        return (object) [
            'page'    => $iPage,
            'perPage' => $iPerPage,
            'total'   => $this->countAll($aData),
            'data'    => $this->getAll($iPage, $iPerPage, $aData, $bIncludeDeleted),
        ];
    }
public function search($sKeywords, $iPage = null, $iPerPage = null, array $aData = [], $bIncludeDeleted = false)
    {
        //  If the second parameter is an array then treat as if called with search($sKeywords, null, null, $aData);
        if (is_array($iPage)) {
            $aData = $iPage;
            $iPage = null;
        }

        $this->applySearchConditionals($aData, $sKeywords);

        return (object) [
            'page'    => $iPage,
            'perPage' => $iPerPage,
            'total'   => $this->countAll($aData),
            'data'    => $this->getAll($iPage, $iPerPage, $aData, $bIncludeDeleted),
        ];
    }
public function search ( $ sKeywords , $ iPage = null , $ iPerPage = null , array $ aData = [ ] , $ bIncludeDeleted = false ) { //  If the second parameter is an array then treat as if called with search($sKeywords, null, null, $aData); if ( is_array ( $ iPage ) ) { $ aData = $ iPage ; $ iPage = null ; } $ this -> applySearchConditionals ( $ aData , $ sKeywords ) ; return ( object ) [ 'page' => $ iPage , 'perPage' => $ iPerPage , 'total' => $ this -> countAll ( $ aData ) , 'data' => $ this -> getAll ( $ iPage , $ iPerPage , $ aData , $ bIncludeDeleted ) , ] ; }
Searches for objects, optionally paginated.

@param string   $sKeywords        The search term
@param int|null $iPage            The page number of the results, if null then no pagination
@param int|null $iPerPage         How many items per page of paginated results
@param mixed    $aData            Any data to pass to getCountCommon()
@param bool     $bIncludeDeleted  If non-destructive delete is enabled then this flag allows you to include
deleted items

@return \stdClass
Searches for objects optionally paginated .