src/components/Auth.php
public function getApiTable($userId, $apiEndpoint)
    {
        $data = [];
        foreach ($this->getPermissionTable($userId) as $item) {
            if ($item['api'] == $apiEndpoint && $item['user_id'] == $userId) {
                $data[] = $item;
            }
        }
        return $data;
    }
public function getApiTable($userId, $apiEndpoint)
    {
        $data = [];
        foreach ($this->getPermissionTable($userId) as $item) {
            if ($item['api'] == $apiEndpoint && $item['user_id'] == $userId) {
                $data[] = $item;
            }
        }
        return $data;
    }
public function getApiTable ( $ userId , $ apiEndpoint ) { $ data = [ ] ; foreach ( $ this -> getPermissionTable ( $ userId ) as $ item ) { if ( $ item [ 'api' ] == $ apiEndpoint && $ item [ 'user_id' ] == $ userId ) { $ data [ ] = $ item ; } } return $ data ; }
Get the data for a given api and user.

@param integer $userId The user id the find the data from.
@param string $apiEndpoint The api endpoint to find from the permission system.
@return array
Get the data for a given api and user .