repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.messageGroupPublish
public function messageGroupPublish($fromUserId, $toGroupId = array(), $objectName, $content, $pushContent='', $pushData = '') { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toGroupId)) throw new Exception('接收群Id 不能为空'); ...
php
public function messageGroupPublish($fromUserId, $toGroupId = array(), $objectName, $content, $pushContent='', $pushData = '') { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toGroupId)) throw new Exception('接收群Id 不能为空'); ...
[ "public", "function", "messageGroupPublish", "(", "$", "fromUserId", ",", "$", "toGroupId", "=", "array", "(", ")", ",", "$", "objectName", ",", "$", "content", ",", "$", "pushContent", "=", "''", ",", "$", "pushData", "=", "''", ")", "{", "try", "{", ...
以一个用户身份向群组发送消息 @param $fromUserId 发送人用户 Id。(必传) @param $toGroupId 接收群Id,提供多个本参数可以实现向多群发送消息。(必传) @param $objectName 消息类型,参考融云消息类型表.消息标志;可自定义消息类型。(必传) @param $content 发送消息内容,参考融云消息类型表.示例说明;如果 objectName 为自定义消息类型,该参数可自定义格式。(必传) @param string $pushContent 如果为自定义消息,定义显示的 Push 内...
[ "以一个用户身份向群组发送消息" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L122-L149
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.messageChatroomPublish
public function messageChatroomPublish($fromUserId, $toChatroomId = array(), $objectName, $content) { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toChatroomId)) throw new Exception('接收聊天室Id 不能为空'); if(empty($obje...
php
public function messageChatroomPublish($fromUserId, $toChatroomId = array(), $objectName, $content) { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toChatroomId)) throw new Exception('接收聊天室Id 不能为空'); if(empty($obje...
[ "public", "function", "messageChatroomPublish", "(", "$", "fromUserId", ",", "$", "toChatroomId", "=", "array", "(", ")", ",", "$", "objectName", ",", "$", "content", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "fromUserId", ")", ")", "throw", ...
一个用户向聊天室发送消息 @param $fromUserId 发送人用户 Id。(必传) @param $toChatroomId 接收聊天室Id,提供多个本参数可以实现向多个聊天室发送消息。(必传) @param $objectName 消息类型,参考融云消息类型表.消息标志;可自定义消息类型。(必传) @param $content 发送消息内容,参考融云消息类型表.示例说明;如果 objectName 为自定义消息类型,该参数可自定义格式。(必传) @return json|xml
[ "一个用户向聊天室发送消息" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L160-L184
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.messageDiscussionPublish
public function messageDiscussionPublish($fromUserId,$toDiscussionId,$objectName,$content,$pushContent='',$pushData='') { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toDiscussionId)) throw new Exception('接收讨论组 Id 不能为空'); ...
php
public function messageDiscussionPublish($fromUserId,$toDiscussionId,$objectName,$content,$pushContent='',$pushData='') { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($toDiscussionId)) throw new Exception('接收讨论组 Id 不能为空'); ...
[ "public", "function", "messageDiscussionPublish", "(", "$", "fromUserId", ",", "$", "toDiscussionId", ",", "$", "objectName", ",", "$", "content", ",", "$", "pushContent", "=", "''", ",", "$", "pushData", "=", "''", ")", "{", "try", "{", "if", "(", "empt...
发送讨论组消息 @param $fromUserId 发送人用户 Id。(必传) @param $toDiscussionId 接收讨论组 Id。(必传) @param $objectName 消息类型,参考融云消息类型表.消息标志;可自定义消息类型。(必传) @param $content 发送消息内容,参考融云消息类型表.示例说明;如果 objectName 为自定义消息类型,该参数可自定义格式。(必传) @param string $pushContent 如果为自定义消息,定义显示的 Push 内容。(可选)...
[ "发送讨论组消息" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L196-L223
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.messageBroadcast
public function messageBroadcast($fromUserId,$objectName,$content) { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($objectName)) throw new Exception('消息类型不能为空'); if(empty($content)) throw new Excepti...
php
public function messageBroadcast($fromUserId,$objectName,$content) { try{ if(empty($fromUserId)) throw new Exception('发送人用户 Id 不能为空'); if(empty($objectName)) throw new Exception('消息类型不能为空'); if(empty($content)) throw new Excepti...
[ "public", "function", "messageBroadcast", "(", "$", "fromUserId", ",", "$", "objectName", ",", "$", "content", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "fromUserId", ")", ")", "throw", "new", "Exception", "(", "'发送人用户 Id 不能为空');", "", "", "if"...
某发送消息给一个应用下的所有注册用户。 @param $fromUserId 发送人用户 Id。(必传) @param $objectName 消息类型,参考融云消息类型表.消息标志;可自定义消息类型。(必传) @param $content 发送消息内容,参考融云消息类型表.示例说明;如果 objectName 为自定义消息类型,该参数可自定义格式。(必传) @return json|xml
[ "某发送消息给一个应用下的所有注册用户。" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L271-L293
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.messageHistory
public function messageHistory($date) { try{ if(empty($date)) throw new Exception('时间不能为空'); $ret = $this->curl('/message/history', array('date' => $date)); if(empty($ret)) throw new Exception('请求失败'); return $ret; }catch (E...
php
public function messageHistory($date) { try{ if(empty($date)) throw new Exception('时间不能为空'); $ret = $this->curl('/message/history', array('date' => $date)); if(empty($ret)) throw new Exception('请求失败'); return $ret; }catch (E...
[ "public", "function", "messageHistory", "(", "$", "date", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "date", ")", ")", "throw", "new", "Exception", "(", "'时间不能为空');", "", "", "$", "ret", "=", "$", "this", "->", "curl", "(", "'/message/histor...
获取 APP 内指定某天某小时内的所有会话消息记录的下载地址 @param $date 指定北京时间某天某小时,格式为:2014010101,表示:2014年1月1日凌晨1点。(必传) @return json|xml
[ "获取", "APP", "内指定某天某小时内的所有会话消息记录的下载地址" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L300-L311
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupSync
public function groupSync($userId, $data = array()) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($data)) throw new Exception('该用户的群信息 不能为空'); $arrKey = array_keys($data); $arrVal = array_values($data)...
php
public function groupSync($userId, $data = array()) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($data)) throw new Exception('该用户的群信息 不能为空'); $arrKey = array_keys($data); $arrVal = array_values($data)...
[ "public", "function", "groupSync", "(", "$", "userId", ",", "$", "data", "=", "array", "(", ")", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'被同步群信息的用户 Id 不能为空');", "", "", "if", "(", "...
向融云服务器提交 userId 对应的用户当前所加入的所有群组。 @param $userId 被同步群信息的用户Id。(必传) @param array $data 该用户的群信息。(必传)array('key'=>'val') @return json|xml
[ "向融云服务器提交", "userId", "对应的用户当前所加入的所有群组。" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L338-L360
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupJoin
public function groupJoin($userId, $groupId, $groupName) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($groupId)) throw new Exception('加入的群 Id 不能为空'); if(empty($groupName)) throw new Exception('加入的...
php
public function groupJoin($userId, $groupId, $groupName) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($groupId)) throw new Exception('加入的群 Id 不能为空'); if(empty($groupName)) throw new Exception('加入的...
[ "public", "function", "groupJoin", "(", "$", "userId", ",", "$", "groupId", ",", "$", "groupName", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'被同步群信息的用户 Id 不能为空');", "", "", "if", "(", "...
将用户加入指定群组,用户将可以收到该群的消息。 @param $userId 要加入群的用户 Id。(必传) @param $groupId 要加入的群 Id。(必传) @param $groupName 要加入的群 Id 对应的名称。(可选) @return json|xml
[ "将用户加入指定群组,用户将可以收到该群的消息。" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L370-L391
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupQuit
public function groupQuit($userId, $groupId) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($groupId)) throw new Exception('加入的群 Id 不能为空'); $ret = $this->curl('/group/quit', array('userId' => $userI...
php
public function groupQuit($userId, $groupId) { try{ if(empty($userId)) throw new Exception('被同步群信息的用户 Id 不能为空'); if(empty($groupId)) throw new Exception('加入的群 Id 不能为空'); $ret = $this->curl('/group/quit', array('userId' => $userI...
[ "public", "function", "groupQuit", "(", "$", "userId", ",", "$", "groupId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'被同步群信息的用户 Id 不能为空');", "", "", "if", "(", "empty", "(", "$", "grou...
将用户从群中移除,不再接收该群组的消息。 @param $userId 要退出群的用户 Id。(必传) @param $groupId 要退出的群 Id。(必传) @return mixed
[ "将用户从群中移除,不再接收该群组的消息。" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L400-L415
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupUserQuery
public function groupUserQuery( $groupId ) { try{ if(empty($groupId)) throw new Exception('要加入的群 Id 不能为空'); $ret = $this->curl('/group/user/query', array('groupId' => $groupId) ); if(empty($ret)) throw new Except...
php
public function groupUserQuery( $groupId ) { try{ if(empty($groupId)) throw new Exception('要加入的群 Id 不能为空'); $ret = $this->curl('/group/user/query', array('groupId' => $groupId) ); if(empty($ret)) throw new Except...
[ "public", "function", "groupUserQuery", "(", "$", "groupId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "groupId", ")", ")", "throw", "new", "Exception", "(", "'要加入的群 Id 不能为空');", "", "", "$", "ret", "=", "$", "this", "->", "curl", "(", "'/g...
查询群成员 方法 @param $groupId 群 Id。(必传) @return json|xml
[ "查询群成员", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L471-L484
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.chatroomCreate
public function chatroomCreate($data = array()) { try{ if(empty($data)) throw new Exception('要加入群的用户 Id 不能为空'); $params = array(); foreach($data as $key=>$val) { $k = 'chatroom['.$key.']'; $params["$k"] = $val; } ...
php
public function chatroomCreate($data = array()) { try{ if(empty($data)) throw new Exception('要加入群的用户 Id 不能为空'); $params = array(); foreach($data as $key=>$val) { $k = 'chatroom['.$key.']'; $params["$k"] = $val; } ...
[ "public", "function", "chatroomCreate", "(", "$", "data", "=", "array", "(", ")", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "data", ")", ")", "throw", "new", "Exception", "(", "'要加入群的用户 Id 不能为空');", "", "", "$", "params", "=", "array", "(",...
创建聊天室 @param array $data key:要创建的聊天室的id;val:要创建的聊天室的name。(必传) @return json|xml
[ "创建聊天室" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L492-L508
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.chatroomQuery
public function chatroomQuery($chatroomId) { try{ if(empty($chatroomId)) throw new Exception('要查询的聊天室 Id 不能为空'); $ret = $this->curl('/chatroom/query', array('chatroomId' => $chatroomId)); if(empty($ret)) throw new Exception('请求失败'); ...
php
public function chatroomQuery($chatroomId) { try{ if(empty($chatroomId)) throw new Exception('要查询的聊天室 Id 不能为空'); $ret = $this->curl('/chatroom/query', array('chatroomId' => $chatroomId)); if(empty($ret)) throw new Exception('请求失败'); ...
[ "public", "function", "chatroomQuery", "(", "$", "chatroomId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "chatroomId", ")", ")", "throw", "new", "Exception", "(", "'要查询的聊天室 Id 不能为空');", "", "", "$", "ret", "=", "$", "this", "->", "curl", "(",...
查询聊天室信息 方法 @param $chatroomId 要查询的聊天室id(必传) @return json|xml
[ "查询聊天室信息", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L533-L544
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.userBlock
public function userBlock($userId,$minute) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($minute)) throw new Exception('封禁时长不能为空'); $ret = $this->curl('/user/block', array('userId' => $userId, 'minute' => $minute)); ...
php
public function userBlock($userId,$minute) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($minute)) throw new Exception('封禁时长不能为空'); $ret = $this->curl('/user/block', array('userId' => $userId, 'minute' => $minute)); ...
[ "public", "function", "userBlock", "(", "$", "userId", ",", "$", "minute", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", "(", "empty", "(", "$", "minute", "...
封禁用户 方法 @param $userId 用户 Id。(必传) @param $minute 封禁时长,单位为分钟,最大值为43200分钟。(必传) @return mixed
[ "封禁用户", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L591-L604
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.userBlockQuery
public function userBlockQuery() { try{ $ret = $this->curl('/user/block/query',''); if(empty($ret)) throw new Exception('请求失败'); return $ret; }catch (Exception $e) { print_r($e->getMessage()); } }
php
public function userBlockQuery() { try{ $ret = $this->curl('/user/block/query',''); if(empty($ret)) throw new Exception('请求失败'); return $ret; }catch (Exception $e) { print_r($e->getMessage()); } }
[ "public", "function", "userBlockQuery", "(", ")", "{", "try", "{", "$", "ret", "=", "$", "this", "->", "curl", "(", "'/user/block/query'", ",", "''", ")", ";", "if", "(", "empty", "(", "$", "ret", ")", ")", "throw", "new", "Exception", "(", "'请求失败');...
获取被封禁用户 方法 @return mixed
[ "获取被封禁用户", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L629-L638
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.userRefresh
public function userRefresh($userId,$name='',$portraitUri='') { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($name)) throw new Exception('用户名称不能为空'); if(empty($portraitUri)) throw new Exception('用户头像 URI 不...
php
public function userRefresh($userId,$name='',$portraitUri='') { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($name)) throw new Exception('用户名称不能为空'); if(empty($portraitUri)) throw new Exception('用户头像 URI 不...
[ "public", "function", "userRefresh", "(", "$", "userId", ",", "$", "name", "=", "''", ",", "$", "portraitUri", "=", "''", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", ...
刷新用户信息 方法 说明:当您的用户昵称和头像变更时,您的 App Server 应该调用此接口刷新在融云侧保存的用户信息,以便融云发送推送消息的时候,能够正确显示用户信息 @param $userId 用户 Id,最大长度 32 字节。是用户在 App 中的唯一标识码,必须保证在同一个 App 内不重复,重复的用户 Id 将被当作是同一用户。(必传) @param string $name 用户名称,最大长度 128 字节。用来在 Push 推送时,或者客户端没有提供用户信息时,显示用户的名称。 @param string $portraitUri 用户头像 URI,最大长度 1024 字节 @return mixed
[ "刷新用户信息", "方法", "说明:当您的用户昵称和头像变更时,您的", "App", "Server", "应该调用此接口刷新在融云侧保存的用户信息,以便融云发送推送消息的时候,能够正确显示用户信息" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L648-L664
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.userBlacklistQuery
public function userBlacklistQuery($userId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); $ret = $this->curl('/user/blacklist/query', array('userId' => $userId)); if(empty($ret)) throw new Exception('请求失败'); return $r...
php
public function userBlacklistQuery($userId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); $ret = $this->curl('/user/blacklist/query', array('userId' => $userId)); if(empty($ret)) throw new Exception('请求失败'); return $r...
[ "public", "function", "userBlacklistQuery", "(", "$", "userId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "$", "ret", "=", "$", "this", "->", "curl", "(", "'/us...
获取某个用户的黑名单列表 @param $userId 用户 Id。(必传) @return mixed
[ "获取某个用户的黑名单列表" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L700-L711
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.userBlacklistRemove
public function userBlacklistRemove($userId, $blackUserId = array()) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($blackUserId)) throw new Exception('被移除的用户 Id 不能为空'); $params = array( 'userId' => $user...
php
public function userBlacklistRemove($userId, $blackUserId = array()) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($blackUserId)) throw new Exception('被移除的用户 Id 不能为空'); $params = array( 'userId' => $user...
[ "public", "function", "userBlacklistRemove", "(", "$", "userId", ",", "$", "blackUserId", "=", "array", "(", ")", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", ...
从黑名单中移除用户 @param $userId 用户 Id。(必传) @param array $blackUserId 被移除的用户Id。(必传) @return mixed
[ "从黑名单中移除用户" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L720-L740
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupUserGagRollback
public function groupUserGagRollback($userId,$groupId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($groupId)) throw new Exception('群组 Id 不能为空'); $params['userId'] = $userId; $params['groupId'] = $groupId; ...
php
public function groupUserGagRollback($userId,$groupId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($groupId)) throw new Exception('群组 Id 不能为空'); $params['userId'] = $userId; $params['groupId'] = $groupId; ...
[ "public", "function", "groupUserGagRollback", "(", "$", "userId", ",", "$", "groupId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", "(", "empty", "(", "$", "...
移除禁言群成员 @param $userId 用户 Id。(必传) @param $groupId 群组 Id。(必传) @return mixed
[ "移除禁言群成员" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L776-L791
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.groupUserGagList
public function groupUserGagList($groupId) { try{ if(empty($groupId)) throw new Exception('群组 Id 不能为空'); $params['groupId'] = $groupId; $ret = $this->curl('/group/user/gag/list',$params); if(empty($ret)) throw new Exception('请求失败');...
php
public function groupUserGagList($groupId) { try{ if(empty($groupId)) throw new Exception('群组 Id 不能为空'); $params['groupId'] = $groupId; $ret = $this->curl('/group/user/gag/list',$params); if(empty($ret)) throw new Exception('请求失败');...
[ "public", "function", "groupUserGagList", "(", "$", "groupId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "groupId", ")", ")", "throw", "new", "Exception", "(", "'群组 Id 不能为空');", "", "", "$", "params", "[", "'groupId'", "]", "=", "$", "groupId...
查询被禁言群成员 @param $groupId 群组 Id。(必传) @return mixed
[ "查询被禁言群成员" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L798-L810
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.wordfilterAdd
public function wordfilterAdd($word) { try{ if(empty($word)) throw new Exception('敏感词不能为空'); $params['word'] = $word; $ret = $this->curl('/wordfilter/add',$params); if(empty($ret)) throw new Exception('请求失败'); return $re...
php
public function wordfilterAdd($word) { try{ if(empty($word)) throw new Exception('敏感词不能为空'); $params['word'] = $word; $ret = $this->curl('/wordfilter/add',$params); if(empty($ret)) throw new Exception('请求失败'); return $re...
[ "public", "function", "wordfilterAdd", "(", "$", "word", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "word", ")", ")", "throw", "new", "Exception", "(", "'敏感词不能为空');", "", "", "$", "params", "[", "'word'", "]", "=", "$", "word", ";", "$", ...
添加敏感词 @param $word 敏感词,最长不超过 32 个字符。(必传) @return mixed
[ "添加敏感词" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L817-L829
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.chatroomUserGagAdd
public function chatroomUserGagAdd($userId,$chatroomId,$minute) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); if(empty($minute) || intval($minute)>43200) ...
php
public function chatroomUserGagAdd($userId,$chatroomId,$minute) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); if(empty($minute) || intval($minute)>43200) ...
[ "public", "function", "chatroomUserGagAdd", "(", "$", "userId", ",", "$", "chatroomId", ",", "$", "minute", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", "(", ...
添加禁言聊天室成员 方法 @param $userId 用户 Id。(必传) @param $chatroomId 聊天室 Id。(必传) @param $minute 禁言时长,以分钟为单位,最大值为43200分钟。(必传) @return mixed
[ "添加禁言聊天室成员", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L871-L889
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.chatroomUserGagRollback
public function chatroomUserGagRollback($userId,$chatroomId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); $params['userId'] = $userId; $params['chatroomId'] ...
php
public function chatroomUserGagRollback($userId,$chatroomId) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); $params['userId'] = $userId; $params['chatroomId'] ...
[ "public", "function", "chatroomUserGagRollback", "(", "$", "userId", ",", "$", "chatroomId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", "(", "empty", "(", "$...
移除禁言聊天室成员 方法 @param $userId 用户 Id。(必传) @param $chatroomId 聊天室 Id。(必传) @return mixed
[ "移除禁言聊天室成员", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L897-L912
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.chatroomUserGagList
public function chatroomUserGagList($chatroomId) { try{ if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); $params['chatroomId'] = $chatroomId; $ret = $this->curl('/chatroom/user/gag/list',$params); if(empty($ret)) throw new...
php
public function chatroomUserGagList($chatroomId) { try{ if(empty($chatroomId)) throw new Exception('聊天室 Id 不能为空'); $params['chatroomId'] = $chatroomId; $ret = $this->curl('/chatroom/user/gag/list',$params); if(empty($ret)) throw new...
[ "public", "function", "chatroomUserGagList", "(", "$", "chatroomId", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "chatroomId", ")", ")", "throw", "new", "Exception", "(", "'聊天室 Id 不能为空');", "", "", "$", "params", "[", "'chatroomId'", "]", "=", "$...
查询被禁言聊天室成员 方法 @param $chatroomId 聊天室 Id。(必传) @return mixed
[ "查询被禁言聊天室成员", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L918-L930
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.pushUserTagSet
public function pushUserTagSet($userId,$tags) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($tags)) throw new Exception('用户标签不能为空'); $params['userId'] = $userId; $params['tags'] = $tags; $ret = $t...
php
public function pushUserTagSet($userId,$tags) { try{ if(empty($userId)) throw new Exception('用户 Id 不能为空'); if(empty($tags)) throw new Exception('用户标签不能为空'); $params['userId'] = $userId; $params['tags'] = $tags; $ret = $t...
[ "public", "function", "pushUserTagSet", "(", "$", "userId", ",", "$", "tags", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "userId", ")", ")", "throw", "new", "Exception", "(", "'用户 Id 不能为空');", "", "", "if", "(", "empty", "(", "$", "tags", ...
推送服务 添加标签 方法 @param string $userId 用户 Id。(必传) @param array $tags 用户标签,一个用户最多添加 20 个标签,每个 tags 最大不能超过 40 个字节,标签中不能包含特殊字符。(必传) @return mixed
[ "推送服务", "添加标签", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L1006-L1021
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.push
public function push( $platform,$audience,$notification ) { try{ if(empty($platform)) throw new Exception('目标操作系统,ios、android 最少传递一个'); if(empty($audience)) throw new Exception('推送条件不能为空'); if( !isset($audience['is_to_all']) ) t...
php
public function push( $platform,$audience,$notification ) { try{ if(empty($platform)) throw new Exception('目标操作系统,ios、android 最少传递一个'); if(empty($audience)) throw new Exception('推送条件不能为空'); if( !isset($audience['is_to_all']) ) t...
[ "public", "function", "push", "(", "$", "platform", ",", "$", "audience", ",", "$", "notification", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "platform", ")", ")", "throw", "new", "Exception", "(", "'目标操作系统,ios、android 最少传递一个');", "", "", "if",...
推送服务 推送 方法 @param $platform 目标操作系统,ios、android 最少传递一个。如果需要给两个系统推送消息时,则需要全部填写。(必传) @param $audience 推送条件,包括: tag 、 userid 、 is_to_all。(必传) @param $audience[ tag ] 用户标签,每次发送时最多发送 20 个标签,标签之间为与的关系,is_to_all 为 true 时可不传。(非必传) @param $audience[ userid ] 用户 Id,每次发送时最多发送 1000 个用户,如果 tag 和 userid 两个条件同时存在时,则以 userid 为准,如果 user...
[ "推送服务", "推送", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L1040-L1062
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.pushMessage
public function pushMessage( $platform,$fromuserid,$audience,$message,$notification ) { try{ if(empty($platform)) throw new Exception('目标操作系统,ios、android 最少传递一个'); if(empty($fromuserid)) throw new Exception('发送人用户 Id 不能为空'); if(empty($audience)...
php
public function pushMessage( $platform,$fromuserid,$audience,$message,$notification ) { try{ if(empty($platform)) throw new Exception('目标操作系统,ios、android 最少传递一个'); if(empty($fromuserid)) throw new Exception('发送人用户 Id 不能为空'); if(empty($audience)...
[ "public", "function", "pushMessage", "(", "$", "platform", ",", "$", "fromuserid", ",", "$", "audience", ",", "$", "message", ",", "$", "notification", ")", "{", "try", "{", "if", "(", "empty", "(", "$", "platform", ")", ")", "throw", "new", "Exception...
推送服务 推送消息 方法 @param $platform 目标操作系统,ios、android 最少传递一个。如果需要给两个系统推送消息时,则需要全部填写。(必传) @param $fromuserid 发送人用户 Id。(必传) @param $audience 推送条件,包括: tag 、 userid 、 is_to_all。(必传) @param $audience[ tag ] 用户标签,每次发送时最多发送 20 个标签,标签之间为与的关系,is_to_all 为 true 时可不传。(非必传) @param $audience[ userid ] 用户 Id,每次发送时最多发送 1000 个用户,如果 tag 和 u...
[ "推送服务", "推送消息", "方法" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L1084-L1114
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.build_query
private function build_query($formData, $numericPrefix = '', $argSeparator = '&', $prefixKey = '') { $str = ''; foreach ($formData as $key => $val) { if (!is_array($val)) { $str .= $argSeparator; if ($prefixKey === '') { if (is_int($key)) {...
php
private function build_query($formData, $numericPrefix = '', $argSeparator = '&', $prefixKey = '') { $str = ''; foreach ($formData as $key => $val) { if (!is_array($val)) { $str .= $argSeparator; if ($prefixKey === '') { if (is_int($key)) {...
[ "private", "function", "build_query", "(", "$", "formData", ",", "$", "numericPrefix", "=", "''", ",", "$", "argSeparator", "=", "'&'", ",", "$", "prefixKey", "=", "''", ")", "{", "$", "str", "=", "''", ";", "foreach", "(", "$", "formData", "as", "$"...
重写实现 http_build_query 提交实现(同名key)key=val1&key=val2 @param array $formData 数据数组 @param string $numericPrefix 数字索引时附加的Key前缀 @param string $argSeparator 参数分隔符(默认为&) @param string $prefixKey Key 数组参数,实现同名方式调用接口 @return string
[ "重写实现", "http_build_query", "提交实现", "(", "同名key", ")", "key", "=", "val1&key", "=", "val2" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L1141-L1169
aobozhang/rongcloud-facades
src/RongCloudClass.php
RongCloudClass.curl
public function curl($action, $params,$contentType='urlencoded') { $action = self::SERVERAPIURL.$action.'.'.$this->format; $httpHeader = $this->createHttpHeader(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $action); curl_setopt($ch, CURLOPT_POST, 1); if ($contentTy...
php
public function curl($action, $params,$contentType='urlencoded') { $action = self::SERVERAPIURL.$action.'.'.$this->format; $httpHeader = $this->createHttpHeader(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $action); curl_setopt($ch, CURLOPT_POST, 1); if ($contentTy...
[ "public", "function", "curl", "(", "$", "action", ",", "$", "params", ",", "$", "contentType", "=", "'urlencoded'", ")", "{", "$", "action", "=", "self", "::", "SERVERAPIURL", ".", "$", "action", ".", "'.'", ".", "$", "this", "->", "format", ";", "$"...
发起 server 请求 @param $action @param $params @param $httpHeader @return mixed
[ "发起", "server", "请求" ]
train
https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudClass.php#L1178-L1204
OKTOTV/OktolabMediaBundle
Controller/StreamController.php
StreamController.newAction
public function newAction(Request $request) { $stream = $this->get('oktolab_media_stream')->createStream(); $form = $this->createForm(StreamType::class, $stream); $form->add( 'submit', SubmitType::class, [ 'label' => 'oktolab_media.new_stre...
php
public function newAction(Request $request) { $stream = $this->get('oktolab_media_stream')->createStream(); $form = $this->createForm(StreamType::class, $stream); $form->add( 'submit', SubmitType::class, [ 'label' => 'oktolab_media.new_stre...
[ "public", "function", "newAction", "(", "Request", "$", "request", ")", "{", "$", "stream", "=", "$", "this", "->", "get", "(", "'oktolab_media_stream'", ")", "->", "createStream", "(", ")", ";", "$", "form", "=", "$", "this", "->", "createForm", "(", ...
Creates a new Episode entity. @Route("/", name="oktolab_media_stream_new") @Method({"GET", "POST"}) @Template()
[ "Creates", "a", "new", "Episode", "entity", "." ]
train
https://github.com/OKTOTV/OktolabMediaBundle/blob/f9c1eac4f6b19d2ab25288b301dd0d9350478bb3/Controller/StreamController.php#L32-L72
OKTOTV/OktolabMediaBundle
Controller/StreamController.php
StreamController.showAction
public function showAction($uniqID) { $em = $this->getDoctrine()->getManager(); $entity = $this->get('oktolab_media_stream')->getStream($uniqID); if (!$entity) { throw $this->createNotFoundException('Unable to find Stream entity.'); } return ['stream' => $entity...
php
public function showAction($uniqID) { $em = $this->getDoctrine()->getManager(); $entity = $this->get('oktolab_media_stream')->getStream($uniqID); if (!$entity) { throw $this->createNotFoundException('Unable to find Stream entity.'); } return ['stream' => $entity...
[ "public", "function", "showAction", "(", "$", "uniqID", ")", "{", "$", "em", "=", "$", "this", "->", "getDoctrine", "(", ")", "->", "getManager", "(", ")", ";", "$", "entity", "=", "$", "this", "->", "get", "(", "'oktolab_media_stream'", ")", "->", "...
Finds and displays a Episode entity. @Route("/show/{uniqID}", name="oktolab_media_stream_show") @Method("GET") @Template()
[ "Finds", "and", "displays", "a", "Episode", "entity", "." ]
train
https://github.com/OKTOTV/OktolabMediaBundle/blob/f9c1eac4f6b19d2ab25288b301dd0d9350478bb3/Controller/StreamController.php#L99-L109
OKTOTV/OktolabMediaBundle
Controller/StreamController.php
StreamController.editAction
public function editAction(Request $request, $uniqID) { $stream = $this->get('oktolab_media_stream')->getStream($uniqID); $form = $this->createForm(StreamType::class, $stream); $form->add( 'submit', SubmitType::class, [ 'label' => 'oktolab_...
php
public function editAction(Request $request, $uniqID) { $stream = $this->get('oktolab_media_stream')->getStream($uniqID); $form = $this->createForm(StreamType::class, $stream); $form->add( 'submit', SubmitType::class, [ 'label' => 'oktolab_...
[ "public", "function", "editAction", "(", "Request", "$", "request", ",", "$", "uniqID", ")", "{", "$", "stream", "=", "$", "this", "->", "get", "(", "'oktolab_media_stream'", ")", "->", "getStream", "(", "$", "uniqID", ")", ";", "$", "form", "=", "$", ...
Displays a form to edit an existing Episode entity. @Route("/edit/{uniqID}", name="oktolab_media_stream_edit") @Method("GET") @Template()
[ "Displays", "a", "form", "to", "edit", "an", "existing", "Episode", "entity", "." ]
train
https://github.com/OKTOTV/OktolabMediaBundle/blob/f9c1eac4f6b19d2ab25288b301dd0d9350478bb3/Controller/StreamController.php#L118-L180
SergioMadness/query-builder
src/abstraction/UpdateBuilder.php
UpdateBuilder.generate
public function generate() { $result = ''; $table = $this->buildTable(); $fields = $this->buildFields(); $where = $this->buildWhere(); $result.='UPDATE '.$table.' SET '.$fields; if ($where != '') { $result.=' '.$where; } return $resul...
php
public function generate() { $result = ''; $table = $this->buildTable(); $fields = $this->buildFields(); $where = $this->buildWhere(); $result.='UPDATE '.$table.' SET '.$fields; if ($where != '') { $result.=' '.$where; } return $resul...
[ "public", "function", "generate", "(", ")", "{", "$", "result", "=", "''", ";", "$", "table", "=", "$", "this", "->", "buildTable", "(", ")", ";", "$", "fields", "=", "$", "this", "->", "buildFields", "(", ")", ";", "$", "where", "=", "$", "this"...
Generate query @return string
[ "Generate", "query" ]
train
https://github.com/SergioMadness/query-builder/blob/95b7a46bba4c4d369101c6f0d37f133fecb3956d/src/abstraction/UpdateBuilder.php#L20-L35
alevilar/ristorantino-vendor
Fidelization/Controller/ClientesController.php
ClientesController.index
public function index() { $this->Prg->commonProcess(); $conds = $this->Cliente->parseCriteria( $this->Prg->parsedParams() ); $this->Cliente->recursive = 0; $descuentoMaximo = Configure::read('Mozo.descuento_maximo'); $currentRole = $this->Session->read('Auth.User.role'); ...
php
public function index() { $this->Prg->commonProcess(); $conds = $this->Cliente->parseCriteria( $this->Prg->parsedParams() ); $this->Cliente->recursive = 0; $descuentoMaximo = Configure::read('Mozo.descuento_maximo'); $currentRole = $this->Session->read('Auth.User.role'); ...
[ "public", "function", "index", "(", ")", "{", "$", "this", "->", "Prg", "->", "commonProcess", "(", ")", ";", "$", "conds", "=", "$", "this", "->", "Cliente", "->", "parseCriteria", "(", "$", "this", "->", "Prg", "->", "parsedParams", "(", ")", ")", ...
index method @return void
[ "index", "method" ]
train
https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Fidelization/Controller/ClientesController.php#L25-L48
alevilar/ristorantino-vendor
Fidelization/Controller/ClientesController.php
ClientesController.simple_add
function simple_add() { $this->pageTitle = 'Agregar Factura A'; $this->layout = false; if (!empty($this->request->data)) { $this->Cliente->create(); if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('Se agregó un nuevo %s', Configure::read('Mesa.tituloCliente') ))...
php
function simple_add() { $this->pageTitle = 'Agregar Factura A'; $this->layout = false; if (!empty($this->request->data)) { $this->Cliente->create(); if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('Se agregó un nuevo %s', Configure::read('Mesa.tituloCliente') ))...
[ "function", "simple_add", "(", ")", "{", "$", "this", "->", "pageTitle", "=", "'Agregar Factura A'", ";", "$", "this", "->", "layout", "=", "false", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "request", "->", "data", ")", ")", "{", "$", ...
addFacturaA
[ "addFacturaA" ]
train
https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Fidelization/Controller/ClientesController.php#L66-L91
alevilar/ristorantino-vendor
Fidelization/Controller/ClientesController.php
ClientesController.add
public function add() { if ($this->request->is('post')) { $this->Cliente->create(); if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('The %s has been saved.', Configure::read('Mesa.tituloCliente'))); return $this->redirect(array('action' => 'index')); } else { $this->...
php
public function add() { if ($this->request->is('post')) { $this->Cliente->create(); if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('The %s has been saved.', Configure::read('Mesa.tituloCliente'))); return $this->redirect(array('action' => 'index')); } else { $this->...
[ "public", "function", "add", "(", ")", "{", "if", "(", "$", "this", "->", "request", "->", "is", "(", "'post'", ")", ")", "{", "$", "this", "->", "Cliente", "->", "create", "(", ")", ";", "if", "(", "$", "this", "->", "Cliente", "->", "save", "...
add method @return void
[ "add", "method" ]
train
https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Fidelization/Controller/ClientesController.php#L100-L115
alevilar/ristorantino-vendor
Fidelization/Controller/ClientesController.php
ClientesController.edit
public function edit($id = null) { if (!$this->Cliente->exists($id)) { throw new NotFoundException(__('Invalid %s', Configure::read('Mesa.tituloCliente'))); } if ($this->request->is(array('post', 'put'))) { if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('The %s has been sa...
php
public function edit($id = null) { if (!$this->Cliente->exists($id)) { throw new NotFoundException(__('Invalid %s', Configure::read('Mesa.tituloCliente'))); } if ($this->request->is(array('post', 'put'))) { if ($this->Cliente->save($this->request->data)) { $this->Session->setFlash(__('The %s has been sa...
[ "public", "function", "edit", "(", "$", "id", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "Cliente", "->", "exists", "(", "$", "id", ")", ")", "{", "throw", "new", "NotFoundException", "(", "__", "(", "'Invalid %s'", ",", "Configure", ...
edit method @throws NotFoundException @param string $id @return void
[ "edit", "method" ]
train
https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Fidelization/Controller/ClientesController.php#L124-L144
Danzabar/config-builder
src/Files/ConfigFile.php
ConfigFile.init
public function init($file) { try { $this->load($file); } catch (Exceptions\FileNotExists $e) { $this->create($file); } }
php
public function init($file) { try { $this->load($file); } catch (Exceptions\FileNotExists $e) { $this->create($file); } }
[ "public", "function", "init", "(", "$", "file", ")", "{", "try", "{", "$", "this", "->", "load", "(", "$", "file", ")", ";", "}", "catch", "(", "Exceptions", "\\", "FileNotExists", "$", "e", ")", "{", "$", "this", "->", "create", "(", "$", "file"...
Attempts loading a file, if its not there, it create its. @param String $file @return ConfigFile @author Dan Cox
[ "Attempts", "loading", "a", "file", "if", "its", "not", "there", "it", "create", "its", "." ]
train
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Files/ConfigFile.php#L96-L106
Danzabar/config-builder
src/Files/ConfigFile.php
ConfigFile.load
public function load($file) { if(!$this->fs->exists($file)) { throw new Exceptions\FileNotExists($file); } $this->file = $file; $this->info->load($file); $this->extension = $this->info->extension; $this->directory = $this->info->directory; $this->filename = $this->info->filename; $this->extracte...
php
public function load($file) { if(!$this->fs->exists($file)) { throw new Exceptions\FileNotExists($file); } $this->file = $file; $this->info->load($file); $this->extension = $this->info->extension; $this->directory = $this->info->directory; $this->filename = $this->info->filename; $this->extracte...
[ "public", "function", "load", "(", "$", "file", ")", "{", "if", "(", "!", "$", "this", "->", "fs", "->", "exists", "(", "$", "file", ")", ")", "{", "throw", "new", "Exceptions", "\\", "FileNotExists", "(", "$", "file", ")", ";", "}", "$", "this",...
Loads the file and its details @param String $file @return ConfigFile @author Dan Cox @throws Exceptions\FileNotExists
[ "Loads", "the", "file", "and", "its", "details" ]
train
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Files/ConfigFile.php#L131-L148
Danzabar/config-builder
src/Files/ConfigFile.php
ConfigFile.saveAs
public function saveAs($extension = NULL) { $extension = (!is_null($extension) ? $extension : $this->extension); $converter = $this->extracter->converter(); $converter->setExtension($extension); $data = $converter->toNative($this->params); // We need to rename the file's extension $this->rename(NULL, $e...
php
public function saveAs($extension = NULL) { $extension = (!is_null($extension) ? $extension : $this->extension); $converter = $this->extracter->converter(); $converter->setExtension($extension); $data = $converter->toNative($this->params); // We need to rename the file's extension $this->rename(NULL, $e...
[ "public", "function", "saveAs", "(", "$", "extension", "=", "NULL", ")", "{", "$", "extension", "=", "(", "!", "is_null", "(", "$", "extension", ")", "?", "$", "extension", ":", "$", "this", "->", "extension", ")", ";", "$", "converter", "=", "$", ...
Save as a different extension @param String $extension @return void @author Dan Cox
[ "Save", "as", "a", "different", "extension" ]
train
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Files/ConfigFile.php#L168-L180
Danzabar/config-builder
src/Files/ConfigFile.php
ConfigFile.rename
public function rename($file = NULL, $extension = NULL) { $target = (!is_null($file) ? $this->filename : $this->extension); $replacement = (!is_null($file) ? $file .'.'. $this->extension : $extension); $this->file = str_replace($target, $replacement, $this->file); }
php
public function rename($file = NULL, $extension = NULL) { $target = (!is_null($file) ? $this->filename : $this->extension); $replacement = (!is_null($file) ? $file .'.'. $this->extension : $extension); $this->file = str_replace($target, $replacement, $this->file); }
[ "public", "function", "rename", "(", "$", "file", "=", "NULL", ",", "$", "extension", "=", "NULL", ")", "{", "$", "target", "=", "(", "!", "is_null", "(", "$", "file", ")", "?", "$", "this", "->", "filename", ":", "$", "this", "->", "extension", ...
Renames a file or changes files extension @param String $file @param String $extension @return void @author Dan Cox
[ "Renames", "a", "file", "or", "changes", "files", "extension" ]
train
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Files/ConfigFile.php#L190-L196
Danzabar/config-builder
src/Files/ConfigFile.php
ConfigFile.save
public function save() { $converter = $this->extracter->converter(); $data = $converter->toNative($this->params); $this->fs->dumpFile($this->file, $data); }
php
public function save() { $converter = $this->extracter->converter(); $data = $converter->toNative($this->params); $this->fs->dumpFile($this->file, $data); }
[ "public", "function", "save", "(", ")", "{", "$", "converter", "=", "$", "this", "->", "extracter", "->", "converter", "(", ")", ";", "$", "data", "=", "$", "converter", "->", "toNative", "(", "$", "this", "->", "params", ")", ";", "$", "this", "->...
Saves the current params to the file @return void @author Dan Cox
[ "Saves", "the", "current", "params", "to", "the", "file" ]
train
https://github.com/Danzabar/config-builder/blob/3b237be578172c32498bbcdfb360e69a6243739d/src/Files/ConfigFile.php#L204-L210
hametuha/wpametu
src/WPametu/API/Rest/RestTemplate.php
RestTemplate.set_data
final protected function set_data($data, $key = ''){ if( empty($key) ){ if( is_array($data) ){ $this->data = array_merge($this->data, $data); } }else{ $this->data[$key] = $data; } }
php
final protected function set_data($data, $key = ''){ if( empty($key) ){ if( is_array($data) ){ $this->data = array_merge($this->data, $data); } }else{ $this->data[$key] = $data; } }
[ "final", "protected", "function", "set_data", "(", "$", "data", ",", "$", "key", "=", "''", ")", "{", "if", "(", "empty", "(", "$", "key", ")", ")", "{", "if", "(", "is_array", "(", "$", "data", ")", ")", "{", "$", "this", "->", "data", "=", ...
Set data @param array|mixed $data @param string $key
[ "Set", "data" ]
train
https://github.com/hametuha/wpametu/blob/0939373800815a8396291143d2a57967340da5aa/src/WPametu/API/Rest/RestTemplate.php#L50-L58
hametuha/wpametu
src/WPametu/API/Rest/RestTemplate.php
RestTemplate.load_template
public function load_template($slug, $name = '', array $args = []){ if( !did_action('template_redirect') ){ do_action('template_redirect'); } if( !$this->filtered ){ add_filter('wp_title', [$this, 'wp_title'], 10, 3); } parent::load_template($slug, $name, ...
php
public function load_template($slug, $name = '', array $args = []){ if( !did_action('template_redirect') ){ do_action('template_redirect'); } if( !$this->filtered ){ add_filter('wp_title', [$this, 'wp_title'], 10, 3); } parent::load_template($slug, $name, ...
[ "public", "function", "load_template", "(", "$", "slug", ",", "$", "name", "=", "''", ",", "array", "$", "args", "=", "[", "]", ")", "{", "if", "(", "!", "did_action", "(", "'template_redirect'", ")", ")", "{", "do_action", "(", "'template_redirect'", ...
Template loader @param string $slug @param string $name @param array $args
[ "Template", "loader" ]
train
https://github.com/hametuha/wpametu/blob/0939373800815a8396291143d2a57967340da5aa/src/WPametu/API/Rest/RestTemplate.php#L67-L75
hametuha/wpametu
src/WPametu/API/Rest/RestTemplate.php
RestTemplate.wp_title
public function wp_title($title, $sep, $location){ if( !empty($this->title) ){ $array = [$this->title]; $sep = ' '.trim($sep).' '; if( 'right' == $location ){ $array[] = $sep; }else{ array_unshift($array, $sep); } ...
php
public function wp_title($title, $sep, $location){ if( !empty($this->title) ){ $array = [$this->title]; $sep = ' '.trim($sep).' '; if( 'right' == $location ){ $array[] = $sep; }else{ array_unshift($array, $sep); } ...
[ "public", "function", "wp_title", "(", "$", "title", ",", "$", "sep", ",", "$", "location", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "title", ")", ")", "{", "$", "array", "=", "[", "$", "this", "->", "title", "]", ";", "$", ...
Filter wp title @param string $title @param string $sep @param string $location @return string
[ "Filter", "wp", "title" ]
train
https://github.com/hametuha/wpametu/blob/0939373800815a8396291143d2a57967340da5aa/src/WPametu/API/Rest/RestTemplate.php#L85-L97
hametuha/wpametu
src/WPametu/API/Rest/RestTemplate.php
RestTemplate.print_file
protected function print_file($path, $mime_type, $file_name = ''){ set_time_limit(0); if( !$file_name ){ $file_name = basename($path); } foreach( array_merge(wp_get_nocache_headers(), [ 'Content-Type' => $mime_type, 'Content-Disposition' => sprintf('attachment; filename="%s"', $file_name), 'Co...
php
protected function print_file($path, $mime_type, $file_name = ''){ set_time_limit(0); if( !$file_name ){ $file_name = basename($path); } foreach( array_merge(wp_get_nocache_headers(), [ 'Content-Type' => $mime_type, 'Content-Disposition' => sprintf('attachment; filename="%s"', $file_name), 'Co...
[ "protected", "function", "print_file", "(", "$", "path", ",", "$", "mime_type", ",", "$", "file_name", "=", "''", ")", "{", "set_time_limit", "(", "0", ")", ";", "if", "(", "!", "$", "file_name", ")", "{", "$", "file_name", "=", "basename", "(", "$",...
Output file @param string $path @param string $mime_type @param string $file_name
[ "Output", "file" ]
train
https://github.com/hametuha/wpametu/blob/0939373800815a8396291143d2a57967340da5aa/src/WPametu/API/Rest/RestTemplate.php#L128-L142
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addBooleanField
public function addBooleanField(string $propertyName, string $dbFieldName = null) { return $this->addField(new BooleanField($propertyName, $dbFieldName)); }
php
public function addBooleanField(string $propertyName, string $dbFieldName = null) { return $this->addField(new BooleanField($propertyName, $dbFieldName)); }
[ "public", "function", "addBooleanField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "BooleanField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")"...
@param string $propertyName @param string|null $dbFieldName @return $this
[ "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L96-L99
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addListField
public function addListField( FieldMetadataInterface $itemMetadata, string $propertyName, string $dbFieldName = null ) { return $this->addField(new ListField($itemMetadata, $propertyName, $dbFieldName)); }
php
public function addListField( FieldMetadataInterface $itemMetadata, string $propertyName, string $dbFieldName = null ) { return $this->addField(new ListField($itemMetadata, $propertyName, $dbFieldName)); }
[ "public", "function", "addListField", "(", "FieldMetadataInterface", "$", "itemMetadata", ",", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "ListField", "(", "$", ...
@param FieldMetadataInterface $itemMetadata @param string $propertyName @param string|null $dbFieldName @return $this
[ "@param", "FieldMetadataInterface", "$itemMetadata", "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L108-L114
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addHashField
public function addHashField( FieldMetadataInterface $itemMetadata, string $propertyName, string $dbFieldName = null ) { return $this->addField(new HashField($itemMetadata, $propertyName, $dbFieldName)); }
php
public function addHashField( FieldMetadataInterface $itemMetadata, string $propertyName, string $dbFieldName = null ) { return $this->addField(new HashField($itemMetadata, $propertyName, $dbFieldName)); }
[ "public", "function", "addHashField", "(", "FieldMetadataInterface", "$", "itemMetadata", ",", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "HashField", "(", "$", ...
@param FieldMetadataInterface $itemMetadata @param string $propertyName @param string|null $dbFieldName @return ClassMetadata
[ "@param", "FieldMetadataInterface", "$itemMetadata", "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L123-L129
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addDateField
public function addDateField(string $propertyName, string $dbFieldName = null) { return $this->addField(new DateField($propertyName, $dbFieldName)); }
php
public function addDateField(string $propertyName, string $dbFieldName = null) { return $this->addField(new DateField($propertyName, $dbFieldName)); }
[ "public", "function", "addDateField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "DateField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")", ")...
@param string $propertyName @param string $dbFieldName @return $this
[ "@param", "string", "$propertyName", "@param", "string", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L137-L140
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addDocumentField
public function addDocumentField(string $documentClass, string $propertyName, string $dbFieldName = null) { return $this->addField(new DocumentField($documentClass, $propertyName, $dbFieldName)); }
php
public function addDocumentField(string $documentClass, string $propertyName, string $dbFieldName = null) { return $this->addField(new DocumentField($documentClass, $propertyName, $dbFieldName)); }
[ "public", "function", "addDocumentField", "(", "string", "$", "documentClass", ",", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "DocumentField", "(", "$", "docu...
@param string $documentClass @param string $propertyName @param string $dbFieldName @return $this
[ "@param", "string", "$documentClass", "@param", "string", "$propertyName", "@param", "string", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L149-L152
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addFloatField
public function addFloatField(string $propertyName, string $dbFieldName = null) { return $this->addField(new FloatField($propertyName, $dbFieldName)); }
php
public function addFloatField(string $propertyName, string $dbFieldName = null) { return $this->addField(new FloatField($propertyName, $dbFieldName)); }
[ "public", "function", "addFloatField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "FloatField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")", ...
@param string $propertyName @param string|null $dbFieldName @return $this
[ "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L160-L163
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addObjectIdField
public function addObjectIdField(string $propertyName, string $dbFieldName = null, bool $generateIfNotSet = false) { return $this->addField( new ObjectIdField($propertyName, $dbFieldName, $generateIfNotSet) ); }
php
public function addObjectIdField(string $propertyName, string $dbFieldName = null, bool $generateIfNotSet = false) { return $this->addField( new ObjectIdField($propertyName, $dbFieldName, $generateIfNotSet) ); }
[ "public", "function", "addObjectIdField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ",", "bool", "$", "generateIfNotSet", "=", "false", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "ObjectIdField", ...
@param string $propertyName @param string $dbFieldName @param bool $generateIfNotSet @return $this
[ "@param", "string", "$propertyName", "@param", "string", "$dbFieldName", "@param", "bool", "$generateIfNotSet" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L172-L177
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addIntegerField
public function addIntegerField(string $propertyName, string $dbFieldName = null) { return $this->addField(new IntegerField($propertyName, $dbFieldName)); }
php
public function addIntegerField(string $propertyName, string $dbFieldName = null) { return $this->addField(new IntegerField($propertyName, $dbFieldName)); }
[ "public", "function", "addIntegerField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "IntegerField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")"...
@param string $propertyName @param string|null $dbFieldName @return $this
[ "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L185-L188
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addStringField
public function addStringField(string $propertyName, string $dbFieldName = null) { return $this->addField(new StringField($propertyName, $dbFieldName)); }
php
public function addStringField(string $propertyName, string $dbFieldName = null) { return $this->addField(new StringField($propertyName, $dbFieldName)); }
[ "public", "function", "addStringField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "StringField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")", ...
@param string $propertyName @param string|null $dbFieldName @return $this
[ "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L196-L199
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.addRawField
public function addRawField(string $propertyName, string $dbFieldName = null) { return $this->addField(new RawField($propertyName, $dbFieldName)); }
php
public function addRawField(string $propertyName, string $dbFieldName = null) { return $this->addField(new RawField($propertyName, $dbFieldName)); }
[ "public", "function", "addRawField", "(", "string", "$", "propertyName", ",", "string", "$", "dbFieldName", "=", "null", ")", "{", "return", "$", "this", "->", "addField", "(", "new", "RawField", "(", "$", "propertyName", ",", "$", "dbFieldName", ")", ")",...
@param string $propertyName @param string|null $dbFieldName @return ClassMetadata
[ "@param", "string", "$propertyName", "@param", "string|null", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L207-L210
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.setNested
public function setNested(bool $nested = true) { if ($nested && (null !== $this->collectionName || null !== $this->collectionOptions)) { $err = 'Document class "%s" cannot be nested if collection name or collection options had been specified.'; throw new LogicException(sprintf($err,...
php
public function setNested(bool $nested = true) { if ($nested && (null !== $this->collectionName || null !== $this->collectionOptions)) { $err = 'Document class "%s" cannot be nested if collection name or collection options had been specified.'; throw new LogicException(sprintf($err,...
[ "public", "function", "setNested", "(", "bool", "$", "nested", "=", "true", ")", "{", "if", "(", "$", "nested", "&&", "(", "null", "!==", "$", "this", "->", "collectionName", "||", "null", "!==", "$", "this", "->", "collectionOptions", ")", ")", "{", ...
@param bool $nested @return $this
[ "@param", "bool", "$nested" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L225-L236
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.getFieldByPropertyName
public function getFieldByPropertyName(string $propertyName): ?FieldMetadataInterface { foreach ($this->fieldsMetadata as $fieldMetadata) { if ($propertyName === $fieldMetadata->getPropertyName()) { return $fieldMetadata; } } return null; }
php
public function getFieldByPropertyName(string $propertyName): ?FieldMetadataInterface { foreach ($this->fieldsMetadata as $fieldMetadata) { if ($propertyName === $fieldMetadata->getPropertyName()) { return $fieldMetadata; } } return null; }
[ "public", "function", "getFieldByPropertyName", "(", "string", "$", "propertyName", ")", ":", "?", "FieldMetadataInterface", "{", "foreach", "(", "$", "this", "->", "fieldsMetadata", "as", "$", "fieldMetadata", ")", "{", "if", "(", "$", "propertyName", "===", ...
@param string $propertyName @return FieldMetadataInterface
[ "@param", "string", "$propertyName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L243-L252
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.getFieldByDbName
public function getFieldByDbName(string $dbFieldName): ?FieldMetadataInterface { foreach ($this->fieldsMetadata as $fieldMetadata) { if ($dbFieldName === $fieldMetadata->getDbFieldName()) { return $fieldMetadata; } } return null; }
php
public function getFieldByDbName(string $dbFieldName): ?FieldMetadataInterface { foreach ($this->fieldsMetadata as $fieldMetadata) { if ($dbFieldName === $fieldMetadata->getDbFieldName()) { return $fieldMetadata; } } return null; }
[ "public", "function", "getFieldByDbName", "(", "string", "$", "dbFieldName", ")", ":", "?", "FieldMetadataInterface", "{", "foreach", "(", "$", "this", "->", "fieldsMetadata", "as", "$", "fieldMetadata", ")", "{", "if", "(", "$", "dbFieldName", "===", "$", "...
@param string $dbFieldName @return FieldMetadataInterface
[ "@param", "string", "$dbFieldName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L259-L268
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.setCollectionName
public function setCollectionName(string $collectionName) { if ($this->nested) { throw new LogicException( sprintf( 'Collection name cannot be set for nested document class "%s".', $this->documentClass ) ); ...
php
public function setCollectionName(string $collectionName) { if ($this->nested) { throw new LogicException( sprintf( 'Collection name cannot be set for nested document class "%s".', $this->documentClass ) ); ...
[ "public", "function", "setCollectionName", "(", "string", "$", "collectionName", ")", "{", "if", "(", "$", "this", "->", "nested", ")", "{", "throw", "new", "LogicException", "(", "sprintf", "(", "'Collection name cannot be set for nested document class \"%s\".'", ","...
@param string $collectionName @return $this
[ "@param", "string", "$collectionName" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L301-L315
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.setCollectionOptions
public function setCollectionOptions(array $collectionOptions) { if ($this->nested) { throw new LogicException( sprintf( 'Collection options cannot be set for nested document class "%s".', $this->documentClass ) ...
php
public function setCollectionOptions(array $collectionOptions) { if ($this->nested) { throw new LogicException( sprintf( 'Collection options cannot be set for nested document class "%s".', $this->documentClass ) ...
[ "public", "function", "setCollectionOptions", "(", "array", "$", "collectionOptions", ")", "{", "if", "(", "$", "this", "->", "nested", ")", "{", "throw", "new", "LogicException", "(", "sprintf", "(", "'Collection options cannot be set for nested document class \"%s\".'...
@param array $collectionOptions @return $this
[ "@param", "array", "$collectionOptions" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L346-L360
tequila/mongodb-odm
src/Metadata/ClassMetadata.php
ClassMetadata.getReflection
public function getReflection(): ClassReflection { if (null === $this->reflection) { $this->reflection = new ClassReflection($this->documentClass); } return $this->reflection; }
php
public function getReflection(): ClassReflection { if (null === $this->reflection) { $this->reflection = new ClassReflection($this->documentClass); } return $this->reflection; }
[ "public", "function", "getReflection", "(", ")", ":", "ClassReflection", "{", "if", "(", "null", "===", "$", "this", "->", "reflection", ")", "{", "$", "this", "->", "reflection", "=", "new", "ClassReflection", "(", "$", "this", "->", "documentClass", ")",...
@return ClassReflection @throws \ReflectionException
[ "@return", "ClassReflection" ]
train
https://github.com/tequila/mongodb-odm/blob/501d58529bbcb23ad7839680462f62d5c3466d23/src/Metadata/ClassMetadata.php#L407-L414
dstuecken/notify
src/NotificationCenter.php
NotificationCenter.getRegisteredHandler
public function getRegisteredHandler($byClassName) { foreach ($this->handlers as $handler) { if (is_a($handler, $byClassName)) { return $handler; } } throw new \InvalidArgumentException('There is no handler named "' . $byClassName ...
php
public function getRegisteredHandler($byClassName) { foreach ($this->handlers as $handler) { if (is_a($handler, $byClassName)) { return $handler; } } throw new \InvalidArgumentException('There is no handler named "' . $byClassName ...
[ "public", "function", "getRegisteredHandler", "(", "$", "byClassName", ")", "{", "foreach", "(", "$", "this", "->", "handlers", "as", "$", "handler", ")", "{", "if", "(", "is_a", "(", "$", "handler", ",", "$", "byClassName", ")", ")", "{", "return", "$...
@param $byClassName @return HandlerInterface
[ "@param", "$byClassName" ]
train
https://github.com/dstuecken/notify/blob/abccf0a6a272caf66baea74323f18e2212c6e11e/src/NotificationCenter.php#L136-L147
dstuecken/notify
src/NotificationCenter.php
NotificationCenter.notify
public function notify(NotificationInterface $notification, $level = self::INFO) { if (!$this->handlers) { $this->addHandler(new NullHandler()); } foreach ($this->getHandlers() as $handler) { if ($handler->shouldHandle($notification, $level)) ...
php
public function notify(NotificationInterface $notification, $level = self::INFO) { if (!$this->handlers) { $this->addHandler(new NullHandler()); } foreach ($this->getHandlers() as $handler) { if ($handler->shouldHandle($notification, $level)) ...
[ "public", "function", "notify", "(", "NotificationInterface", "$", "notification", ",", "$", "level", "=", "self", "::", "INFO", ")", "{", "if", "(", "!", "$", "this", "->", "handlers", ")", "{", "$", "this", "->", "addHandler", "(", "new", "NullHandler"...
Handles notification for every handler @param NotificationInterface $notification the notification instanceitself @param int $level Level of this notification @return bool
[ "Handles", "notification", "for", "every", "handler" ]
train
https://github.com/dstuecken/notify/blob/abccf0a6a272caf66baea74323f18e2212c6e11e/src/NotificationCenter.php#L157-L176
dstuecken/notify
src/NotificationCenter.php
NotificationCenter.log
public function log($level, $message, array $context = []) { return $this->notify( new DetailedNotification($message, '', $context), $level ); }
php
public function log($level, $message, array $context = []) { return $this->notify( new DetailedNotification($message, '', $context), $level ); }
[ "public", "function", "log", "(", "$", "level", ",", "$", "message", ",", "array", "$", "context", "=", "[", "]", ")", "{", "return", "$", "this", "->", "notify", "(", "new", "DetailedNotification", "(", "$", "message", ",", "''", ",", "$", "context"...
Adds a new notification message to the queue as an attribute aware notification @param mixed $level The log level @param string $message notification message (body) @param array $context notification parameters @return bool record processed or not?
[ "Adds", "a", "new", "notification", "message", "to", "the", "queue", "as", "an", "attribute", "aware", "notification" ]
train
https://github.com/dstuecken/notify/blob/abccf0a6a272caf66baea74323f18e2212c6e11e/src/NotificationCenter.php#L187-L193
tigron/skeleton-file
migration/20180626_141100_innodb.php
Migration_20180626_141100_Innodb.up
public function up() { $db = Database::get(); $result = $db->get_row('show table status where NAME="file"', []); if (isset($result['engine']) and $result['engine'] == 'InnoDB') { return; } if (isset($result['Engine']) and $result['Engine'] == 'InnoDB') { return; } $db->query(" ...
php
public function up() { $db = Database::get(); $result = $db->get_row('show table status where NAME="file"', []); if (isset($result['engine']) and $result['engine'] == 'InnoDB') { return; } if (isset($result['Engine']) and $result['Engine'] == 'InnoDB') { return; } $db->query(" ...
[ "public", "function", "up", "(", ")", "{", "$", "db", "=", "Database", "::", "get", "(", ")", ";", "$", "result", "=", "$", "db", "->", "get_row", "(", "'show table status where NAME=\"file\"'", ",", "[", "]", ")", ";", "if", "(", "isset", "(", "$", ...
Migrate up @access public
[ "Migrate", "up" ]
train
https://github.com/tigron/skeleton-file/blob/97978d49f179f07c76380ddc8919b8a7d56dee61/migration/20180626_141100_innodb.php#L21-L36
ekuiter/feature-php
FeaturePhp/Generator/RuntimeGenerator.php
RuntimeGenerator.encodeFeatureNames
private function encodeFeatureNames($artifacts) { $featureNames = array(); foreach ($artifacts as $artifact) { $featureName = $artifact->getFeature()->getName(); $featureNames[] = $featureName; $this->logFile->log($artifact, "added runtime information in \"$this->targ...
php
private function encodeFeatureNames($artifacts) { $featureNames = array(); foreach ($artifacts as $artifact) { $featureName = $artifact->getFeature()->getName(); $featureNames[] = $featureName; $this->logFile->log($artifact, "added runtime information in \"$this->targ...
[ "private", "function", "encodeFeatureNames", "(", "$", "artifacts", ")", "{", "$", "featureNames", "=", "array", "(", ")", ";", "foreach", "(", "$", "artifacts", "as", "$", "artifact", ")", "{", "$", "featureName", "=", "$", "artifact", "->", "getFeature",...
Returns the JSON-encoded names of the corresponding features of some artifacts. The JSON is assumed to then be enclosed in single quotes ('). @param \FeaturePhp\Artifact\Artifact[] @return string
[ "Returns", "the", "JSON", "-", "encoded", "names", "of", "the", "corresponding", "features", "of", "some", "artifacts", ".", "The", "JSON", "is", "assumed", "to", "then", "be", "enclosed", "in", "single", "quotes", "(", ")", "." ]
train
https://github.com/ekuiter/feature-php/blob/daf4a59098802fedcfd1f1a1d07847fcf2fea7bf/FeaturePhp/Generator/RuntimeGenerator.php#L71-L79
ekuiter/feature-php
FeaturePhp/Generator/RuntimeGenerator.php
RuntimeGenerator._generateFiles
protected function _generateFiles() { if ($this->feature && !$this->isSelectedFeature($this->feature)) { $this->logFile->log(null, "did not add runtime information because \"$this->feature\" is not selected"); return; } $this->files[] = fphp\File\TemplateFile::fr...
php
protected function _generateFiles() { if ($this->feature && !$this->isSelectedFeature($this->feature)) { $this->logFile->log(null, "did not add runtime information because \"$this->feature\" is not selected"); return; } $this->files[] = fphp\File\TemplateFile::fr...
[ "protected", "function", "_generateFiles", "(", ")", "{", "if", "(", "$", "this", "->", "feature", "&&", "!", "$", "this", "->", "isSelectedFeature", "(", "$", "this", "->", "feature", ")", ")", "{", "$", "this", "->", "logFile", "->", "log", "(", "n...
Generates the runtime file. Internally, this uses a template file and assigns the given variables. You can override this to add runtime information for other languages. If a feature was supplied, only generates if that feature is selected.
[ "Generates", "the", "runtime", "file", ".", "Internally", "this", "uses", "a", "template", "file", "and", "assigns", "the", "given", "variables", ".", "You", "can", "override", "this", "to", "add", "runtime", "information", "for", "other", "languages", ".", ...
train
https://github.com/ekuiter/feature-php/blob/daf4a59098802fedcfd1f1a1d07847fcf2fea7bf/FeaturePhp/Generator/RuntimeGenerator.php#L87-L106
ekuiter/feature-php
FeaturePhp/Generator/RuntimeGenerator.php
RuntimeGenerator.traceRuntimeCalls
public function traceRuntimeCalls($files, $productLine) { $runtimeCalls = array(); foreach ($files as $file) { $content = $file->getContent(); if ($content instanceof fphp\File\StoredFileContent) { $fileSource = $content->getFileSource(); ...
php
public function traceRuntimeCalls($files, $productLine) { $runtimeCalls = array(); foreach ($files as $file) { $content = $file->getContent(); if ($content instanceof fphp\File\StoredFileContent) { $fileSource = $content->getFileSource(); ...
[ "public", "function", "traceRuntimeCalls", "(", "$", "files", ",", "$", "productLine", ")", "{", "$", "runtimeCalls", "=", "array", "(", ")", ";", "foreach", "(", "$", "files", "as", "$", "file", ")", "{", "$", "content", "=", "$", "file", "->", "get...
Returns tracing links for all calls of the runtime class. @param \FeaturePhp\File\File[] $files @param \FeaturePhp\ProductLine\ProductLine $productLine @return \FeaturePhp\Artifact\TracingLink[]
[ "Returns", "tracing", "links", "for", "all", "calls", "of", "the", "runtime", "class", "." ]
train
https://github.com/ekuiter/feature-php/blob/daf4a59098802fedcfd1f1a1d07847fcf2fea7bf/FeaturePhp/Generator/RuntimeGenerator.php#L114-L144
oroinc/OroLayoutComponent
Extension/DependencyInjection/DependencyInjectionExtension.php
DependencyInjectionExtension.getLayoutUpdates
public function getLayoutUpdates(LayoutItemInterface $item) { $idOrAlias = $item->getAlias() ?: $item->getId(); $layoutUpdates = []; if (isset($this->layoutUpdateServiceIds[$idOrAlias])) { foreach ($this->layoutUpdateServiceIds[$idOrAlias] as $serviceId) { $l...
php
public function getLayoutUpdates(LayoutItemInterface $item) { $idOrAlias = $item->getAlias() ?: $item->getId(); $layoutUpdates = []; if (isset($this->layoutUpdateServiceIds[$idOrAlias])) { foreach ($this->layoutUpdateServiceIds[$idOrAlias] as $serviceId) { $l...
[ "public", "function", "getLayoutUpdates", "(", "LayoutItemInterface", "$", "item", ")", "{", "$", "idOrAlias", "=", "$", "item", "->", "getAlias", "(", ")", "?", ":", "$", "item", "->", "getId", "(", ")", ";", "$", "layoutUpdates", "=", "[", "]", ";", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/DependencyInjection/DependencyInjectionExtension.php#L155-L167
oroinc/OroLayoutComponent
Extension/DependencyInjection/DependencyInjectionExtension.php
DependencyInjectionExtension.hasLayoutUpdates
public function hasLayoutUpdates(LayoutItemInterface $item) { $idOrAlias = $item->getAlias() ?: $item->getId(); return isset($this->layoutUpdateServiceIds[$idOrAlias]); }
php
public function hasLayoutUpdates(LayoutItemInterface $item) { $idOrAlias = $item->getAlias() ?: $item->getId(); return isset($this->layoutUpdateServiceIds[$idOrAlias]); }
[ "public", "function", "hasLayoutUpdates", "(", "LayoutItemInterface", "$", "item", ")", "{", "$", "idOrAlias", "=", "$", "item", "->", "getAlias", "(", ")", "?", ":", "$", "item", "->", "getId", "(", ")", ";", "return", "isset", "(", "$", "this", "->",...
{@inheritdoc}
[ "{" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/DependencyInjection/DependencyInjectionExtension.php#L172-L177
oroinc/OroLayoutComponent
Extension/DependencyInjection/DependencyInjectionExtension.php
DependencyInjectionExtension.getContextConfigurators
public function getContextConfigurators() { $configurators = []; foreach ($this->contextConfiguratorServiceIds as $serviceId) { $configurators[] = $this->container->get($serviceId); } return $configurators; }
php
public function getContextConfigurators() { $configurators = []; foreach ($this->contextConfiguratorServiceIds as $serviceId) { $configurators[] = $this->container->get($serviceId); } return $configurators; }
[ "public", "function", "getContextConfigurators", "(", ")", "{", "$", "configurators", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "contextConfiguratorServiceIds", "as", "$", "serviceId", ")", "{", "$", "configurators", "[", "]", "=", "$", "this", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/DependencyInjection/DependencyInjectionExtension.php#L182-L191
oroinc/OroLayoutComponent
Extension/DependencyInjection/DependencyInjectionExtension.php
DependencyInjectionExtension.getDataProvider
public function getDataProvider($name) { if (!isset($this->dataProviderServiceIds[$name])) { throw new Exception\InvalidArgumentException( sprintf('The data provider "%s" is not registered with the service container.', $name) ); } return $this->contai...
php
public function getDataProvider($name) { if (!isset($this->dataProviderServiceIds[$name])) { throw new Exception\InvalidArgumentException( sprintf('The data provider "%s" is not registered with the service container.', $name) ); } return $this->contai...
[ "public", "function", "getDataProvider", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "dataProviderServiceIds", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "Exception", "\\", "InvalidArgumentException", "(", "sprin...
{@inheritdoc}
[ "{" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/DependencyInjection/DependencyInjectionExtension.php#L204-L213
mustardandrew/muan-laravel-acl
src/Commands/Role/ClearPermissionCommand.php
ClearPermissionCommand.handle
public function handle() { $roleName = $this->argument('role'); if (! $role = Role::whereName($roleName)->first()) { $this->warn("Role {$roleName} not exists."); return 1; } $role->clearPermissions(); echo "Clear permissions. Done!", PHP_EOL; ...
php
public function handle() { $roleName = $this->argument('role'); if (! $role = Role::whereName($roleName)->first()) { $this->warn("Role {$roleName} not exists."); return 1; } $role->clearPermissions(); echo "Clear permissions. Done!", PHP_EOL; ...
[ "public", "function", "handle", "(", ")", "{", "$", "roleName", "=", "$", "this", "->", "argument", "(", "'role'", ")", ";", "if", "(", "!", "$", "role", "=", "Role", "::", "whereName", "(", "$", "roleName", ")", "->", "first", "(", ")", ")", "{"...
Execute the console command. @return mixed
[ "Execute", "the", "console", "command", "." ]
train
https://github.com/mustardandrew/muan-laravel-acl/blob/b5f23340b5536babb98d9fd0d727a7a3371c97d5/src/Commands/Role/ClearPermissionCommand.php#L34-L47
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.generateXml
public function generateXml() { $xml = $this->getUpdate()->asSimplexml(); $removeInstructions = $xml->xpath("//remove"); if (is_array($removeInstructions)) { foreach ($removeInstructions as $infoNode) { /** @var Mage_Core_Model_Layout_Element $infoNode */ ...
php
public function generateXml() { $xml = $this->getUpdate()->asSimplexml(); $removeInstructions = $xml->xpath("//remove"); if (is_array($removeInstructions)) { foreach ($removeInstructions as $infoNode) { /** @var Mage_Core_Model_Layout_Element $infoNode */ ...
[ "public", "function", "generateXml", "(", ")", "{", "$", "xml", "=", "$", "this", "->", "getUpdate", "(", ")", "->", "asSimplexml", "(", ")", ";", "$", "removeInstructions", "=", "$", "xml", "->", "xpath", "(", "\"//remove\"", ")", ";", "if", "(", "i...
Layout XML generation @return Aoe_Layout_Model_Layout
[ "Layout", "XML", "generation" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L14-L38
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.generateBlocks
public function generateBlocks($parent = null) { if ($parent instanceof Mage_Core_Model_Layout_Element) { // This prevents processing child blocks if the parent block fails a conditional check if (!$this->checkConditionals($parent)) { return; } ...
php
public function generateBlocks($parent = null) { if ($parent instanceof Mage_Core_Model_Layout_Element) { // This prevents processing child blocks if the parent block fails a conditional check if (!$this->checkConditionals($parent)) { return; } ...
[ "public", "function", "generateBlocks", "(", "$", "parent", "=", "null", ")", "{", "if", "(", "$", "parent", "instanceof", "Mage_Core_Model_Layout_Element", ")", "{", "// This prevents processing child blocks if the parent block fails a conditional check", "if", "(", "!", ...
Create layout blocks hierarchy from layout xml configuration @param Mage_Core_Model_Layout_Element|null $parent
[ "Create", "layout", "blocks", "hierarchy", "from", "layout", "xml", "configuration" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L45-L58
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout._generateBlock
protected function _generateBlock($node, $parent) { if ($node instanceof Mage_Core_Model_Layout_Element) { if (!$this->checkConditionals($node)) { return $this; } } return parent::_generateBlock($node, $parent); }
php
protected function _generateBlock($node, $parent) { if ($node instanceof Mage_Core_Model_Layout_Element) { if (!$this->checkConditionals($node)) { return $this; } } return parent::_generateBlock($node, $parent); }
[ "protected", "function", "_generateBlock", "(", "$", "node", ",", "$", "parent", ")", "{", "if", "(", "$", "node", "instanceof", "Mage_Core_Model_Layout_Element", ")", "{", "if", "(", "!", "$", "this", "->", "checkConditionals", "(", "$", "node", ")", ")",...
Add block object to layout based on xml node data @param Varien_Simplexml_Element $node @param Varien_Simplexml_Element $parent @return Aoe_Layout_Model_Layout
[ "Add", "block", "object", "to", "layout", "based", "on", "xml", "node", "data" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L68-L77
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout._generateAction
protected function _generateAction($node, $parent) { if ($node instanceof Mage_Core_Model_Layout_Element) { if (!$this->checkConditionals($node)) { return $this; } } $method = (string)$node['method']; if (!empty($node['block'])) { ...
php
protected function _generateAction($node, $parent) { if ($node instanceof Mage_Core_Model_Layout_Element) { if (!$this->checkConditionals($node)) { return $this; } } $method = (string)$node['method']; if (!empty($node['block'])) { ...
[ "protected", "function", "_generateAction", "(", "$", "node", ",", "$", "parent", ")", "{", "if", "(", "$", "node", "instanceof", "Mage_Core_Model_Layout_Element", ")", "{", "if", "(", "!", "$", "this", "->", "checkConditionals", "(", "$", "node", ")", ")"...
Convert an action node into a method call on the parent block @param Varien_Simplexml_Element $node @param Varien_Simplexml_Element $parent @return Aoe_Layout_Model_Layout
[ "Convert", "an", "action", "node", "into", "a", "method", "call", "on", "the", "parent", "block" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L87-L123
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.processActionArgs
protected function processActionArgs(array $args, $jsonArgs = [], $jsonHelper = null, $transArgs = [], $transHelper = null, $currentPath = '') { $jsonHelper = ((!is_null($jsonHelper) && method_exists($jsonHelper, 'jsonDecode')) ? $jsonHelper : Mage::helper('core')); $transHelper = ((!is_null($transH...
php
protected function processActionArgs(array $args, $jsonArgs = [], $jsonHelper = null, $transArgs = [], $transHelper = null, $currentPath = '') { $jsonHelper = ((!is_null($jsonHelper) && method_exists($jsonHelper, 'jsonDecode')) ? $jsonHelper : Mage::helper('core')); $transHelper = ((!is_null($transH...
[ "protected", "function", "processActionArgs", "(", "array", "$", "args", ",", "$", "jsonArgs", "=", "[", "]", ",", "$", "jsonHelper", "=", "null", ",", "$", "transArgs", "=", "[", "]", ",", "$", "transHelper", "=", "null", ",", "$", "currentPath", "=",...
@param array $args @param array $jsonArgs @param null $jsonHelper @param array $transArgs @param null $transHelper @param string $currentPath @return array
[ "@param", "array", "$args", "@param", "array", "$jsonArgs", "@param", "null", "$jsonHelper", "@param", "array", "$transArgs", "@param", "null", "$transHelper", "@param", "string", "$currentPath" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L135-L178
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.getHelperMethodValue
protected function getHelperMethodValue($helperMethodString, $args = null) { $helperName = explode('/', (string)$helperMethodString); $helperMethod = array_pop($helperName); $helperName = implode('/', $helperName); $helperArgs = []; if (!is_array($args)) { $helpe...
php
protected function getHelperMethodValue($helperMethodString, $args = null) { $helperName = explode('/', (string)$helperMethodString); $helperMethod = array_pop($helperName); $helperName = implode('/', $helperName); $helperArgs = []; if (!is_array($args)) { $helpe...
[ "protected", "function", "getHelperMethodValue", "(", "$", "helperMethodString", ",", "$", "args", "=", "null", ")", "{", "$", "helperName", "=", "explode", "(", "'/'", ",", "(", "string", ")", "$", "helperMethodString", ")", ";", "$", "helperMethod", "=", ...
Gets the value of a helper method from the helper method string @param $helperMethodString @param array|string $args @return mixed
[ "Gets", "the", "value", "of", "a", "helper", "method", "from", "the", "helper", "method", "string" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L188-L202
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.processOutputAttribute
protected function processOutputAttribute(Mage_Core_Model_Layout_Element $node) { if (isset($node['output'])) { $blockName = (string)$node['name']; if (empty($blockName)) { return; } $method = trim((string)$node['output']); if (empt...
php
protected function processOutputAttribute(Mage_Core_Model_Layout_Element $node) { if (isset($node['output'])) { $blockName = (string)$node['name']; if (empty($blockName)) { return; } $method = trim((string)$node['output']); if (empt...
[ "protected", "function", "processOutputAttribute", "(", "Mage_Core_Model_Layout_Element", "$", "node", ")", "{", "if", "(", "isset", "(", "$", "node", "[", "'output'", "]", ")", ")", "{", "$", "blockName", "=", "(", "string", ")", "$", "node", "[", "'name'...
Process the 'output' attribute of a node This is an extension that allows the output attribute to be specified on reference elements. It also adds the ability to disable output of the node by setting the value to an empty string. @param Mage_Core_Model_Layout_Element $node
[ "Process", "the", "output", "attribute", "of", "a", "node" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L212-L226
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.checkConditionals
protected function checkConditionals(Mage_Core_Model_Layout_Element $node, $aclDefault = true) { return $this->checkConfigConditional($node) && ($aclDefault ? $this->checkAclConditional($node, $aclDefault) : !$this->checkAclConditional($node, $aclDefault)) && $this->checkHelper...
php
protected function checkConditionals(Mage_Core_Model_Layout_Element $node, $aclDefault = true) { return $this->checkConfigConditional($node) && ($aclDefault ? $this->checkAclConditional($node, $aclDefault) : !$this->checkAclConditional($node, $aclDefault)) && $this->checkHelper...
[ "protected", "function", "checkConditionals", "(", "Mage_Core_Model_Layout_Element", "$", "node", ",", "$", "aclDefault", "=", "true", ")", "{", "return", "$", "this", "->", "checkConfigConditional", "(", "$", "node", ")", "&&", "(", "$", "aclDefault", "?", "$...
Checks all conditionals for a given layout node @param Mage_Core_Model_Layout_Element $node @param bool $aclDefault @return bool
[ "Checks", "all", "conditionals", "for", "a", "given", "layout", "node" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L236-L241
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.checkConfigConditional
protected function checkConfigConditional(Mage_Core_Model_Layout_Element $node) { if (isset($node['ifconfig']) && ($configPath = trim((string)$node['ifconfig']))) { $negativeCheck = (substr($configPath, 0, 1) === '!'); $configPath = ($negativeCheck ? substr($configPath, 1) : $configP...
php
protected function checkConfigConditional(Mage_Core_Model_Layout_Element $node) { if (isset($node['ifconfig']) && ($configPath = trim((string)$node['ifconfig']))) { $negativeCheck = (substr($configPath, 0, 1) === '!'); $configPath = ($negativeCheck ? substr($configPath, 1) : $configP...
[ "protected", "function", "checkConfigConditional", "(", "Mage_Core_Model_Layout_Element", "$", "node", ")", "{", "if", "(", "isset", "(", "$", "node", "[", "'ifconfig'", "]", ")", "&&", "(", "$", "configPath", "=", "trim", "(", "(", "string", ")", "$", "no...
Process the 'ifconfig' and 'unlessconfig' attributes to possibly disable a block/reference/action @param Mage_Core_Model_Layout_Element $node @return bool
[ "Process", "the", "ifconfig", "and", "unlessconfig", "attributes", "to", "possibly", "disable", "a", "block", "/", "reference", "/", "action" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L250-L268
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.checkAclConditional
protected function checkAclConditional(Mage_Core_Model_Layout_Element $node, $default = true) { if (isset($node['acl']) && ($aclPath = trim((string)$node['acl']))) { $negativeCheck = (substr($aclPath, 0, 1) === '!'); $aclPath = ($negativeCheck ? substr($aclPath, 1) : $aclPath); ...
php
protected function checkAclConditional(Mage_Core_Model_Layout_Element $node, $default = true) { if (isset($node['acl']) && ($aclPath = trim((string)$node['acl']))) { $negativeCheck = (substr($aclPath, 0, 1) === '!'); $aclPath = ($negativeCheck ? substr($aclPath, 1) : $aclPath); ...
[ "protected", "function", "checkAclConditional", "(", "Mage_Core_Model_Layout_Element", "$", "node", ",", "$", "default", "=", "true", ")", "{", "if", "(", "isset", "(", "$", "node", "[", "'acl'", "]", ")", "&&", "(", "$", "aclPath", "=", "trim", "(", "("...
Process the 'acl' attributes to possibly disable a block/reference/action @param Mage_Core_Model_Layout_Element $node @param bool $default @return bool
[ "Process", "the", "acl", "attributes", "to", "possibly", "disable", "a", "block", "/", "reference", "/", "action" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L278-L291
AOEpeople/Aoe_Layout
app/code/local/Aoe/Layout/Model/Layout.php
Aoe_Layout_Model_Layout.checkHelperConditional
protected function checkHelperConditional(Mage_Core_Model_Layout_Element $node) { if (isset($node['ifhelper']) && ($helperString = trim((string)$node['ifhelper']))) { $negativeCheck = (substr($helperString, 0, 1) === '!'); $helperString = ($negativeCheck ? substr($helperString, 1) : ...
php
protected function checkHelperConditional(Mage_Core_Model_Layout_Element $node) { if (isset($node['ifhelper']) && ($helperString = trim((string)$node['ifhelper']))) { $negativeCheck = (substr($helperString, 0, 1) === '!'); $helperString = ($negativeCheck ? substr($helperString, 1) : ...
[ "protected", "function", "checkHelperConditional", "(", "Mage_Core_Model_Layout_Element", "$", "node", ")", "{", "if", "(", "isset", "(", "$", "node", "[", "'ifhelper'", "]", ")", "&&", "(", "$", "helperString", "=", "trim", "(", "(", "string", ")", "$", "...
Process the 'ifhelper' attributes to possibly disable a block/reference/action @param Mage_Core_Model_Layout_Element $node @return bool
[ "Process", "the", "ifhelper", "attributes", "to", "possibly", "disable", "a", "block", "/", "reference", "/", "action" ]
train
https://github.com/AOEpeople/Aoe_Layout/blob/d88ba3406cf12dbaf09548477133c3cb27d155ed/app/code/local/Aoe/Layout/Model/Layout.php#L300-L311
mustardandrew/muan-laravel-acl
src/Commands/Permission/ListCommand.php
ListCommand.handle
public function handle() { $permissions = Permission::all(['id', 'name', 'created_at', 'updated_at']); if ($permissions->count()) { $this->table( ['ID', 'Permission', 'Created At', 'Updated At'], $permissions->toArray() ); } else { ...
php
public function handle() { $permissions = Permission::all(['id', 'name', 'created_at', 'updated_at']); if ($permissions->count()) { $this->table( ['ID', 'Permission', 'Created At', 'Updated At'], $permissions->toArray() ); } else { ...
[ "public", "function", "handle", "(", ")", "{", "$", "permissions", "=", "Permission", "::", "all", "(", "[", "'id'", ",", "'name'", ",", "'created_at'", ",", "'updated_at'", "]", ")", ";", "if", "(", "$", "permissions", "->", "count", "(", ")", ")", ...
Execute the console command. @return mixed
[ "Execute", "the", "console", "command", "." ]
train
https://github.com/mustardandrew/muan-laravel-acl/blob/b5f23340b5536babb98d9fd0d727a7a3371c97d5/src/Commands/Permission/ListCommand.php#L34-L48
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/handlers/mysql/reader.php
ezcDbSchemaMysqlReader.fetchTableFields
protected function fetchTableFields( $tableName ) { $fields = array(); $resultArray = $this->db->query( "DESCRIBE `$tableName`" ); $resultArray->setFetchMode( PDO::FETCH_ASSOC ); foreach ( $resultArray as $row ) { $row = $this->lowercase($row); $fiel...
php
protected function fetchTableFields( $tableName ) { $fields = array(); $resultArray = $this->db->query( "DESCRIBE `$tableName`" ); $resultArray->setFetchMode( PDO::FETCH_ASSOC ); foreach ( $resultArray as $row ) { $row = $this->lowercase($row); $fiel...
[ "protected", "function", "fetchTableFields", "(", "$", "tableName", ")", "{", "$", "fields", "=", "array", "(", ")", ";", "$", "resultArray", "=", "$", "this", "->", "db", "->", "query", "(", "\"DESCRIBE `$tableName`\"", ")", ";", "$", "resultArray", "->",...
Fetch fields definition for the table $tableName This method loops over all the fields in the table $tableName and returns an array with the field specification. The key in the returned array is the name of the field. @param string $tableName @return array(string=>ezcDbSchemaField)
[ "Fetch", "fields", "definition", "for", "the", "table", "$tableName" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/handlers/mysql/reader.php#L85-L148
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/handlers/mysql/reader.php
ezcDbSchemaMysqlReader.fetchTableIndexes
protected function fetchTableIndexes( $tableName ) { $indexBuffer = array(); $resultArray = $this->db->query( "SHOW INDEX FROM `$tableName`" ); foreach ( $resultArray as $row ) { $keyName = $row['key_name']; if ( $keyName == 'PRIMARY' ) {...
php
protected function fetchTableIndexes( $tableName ) { $indexBuffer = array(); $resultArray = $this->db->query( "SHOW INDEX FROM `$tableName`" ); foreach ( $resultArray as $row ) { $keyName = $row['key_name']; if ( $keyName == 'PRIMARY' ) {...
[ "protected", "function", "fetchTableIndexes", "(", "$", "tableName", ")", "{", "$", "indexBuffer", "=", "array", "(", ")", ";", "$", "resultArray", "=", "$", "this", "->", "db", "->", "query", "(", "\"SHOW INDEX FROM `$tableName`\"", ")", ";", "foreach", "("...
Loops over all the indexes in the table $table and extracts information. This method extracts information about the table $tableName's indexes from the database and returns this schema as an array of ezcDbSchemaIndex objects. The key in the array is the index' name. @param string $tableName @return array(string=>ezc...
[ "Loops", "over", "all", "the", "indexes", "in", "the", "table", "$table", "and", "extracts", "information", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/handlers/mysql/reader.php#L234-L277
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.AccessDir
private function AccessDir($requestDirectory) { $full_request_images_dir = realpath($this->dir['images'] . $requestDirectory); if (strpos($full_request_images_dir, $this->dir['images']) === 0) { return $full_request_images_dir; } return false; }
php
private function AccessDir($requestDirectory) { $full_request_images_dir = realpath($this->dir['images'] . $requestDirectory); if (strpos($full_request_images_dir, $this->dir['images']) === 0) { return $full_request_images_dir; } return false; }
[ "private", "function", "AccessDir", "(", "$", "requestDirectory", ")", "{", "$", "full_request_images_dir", "=", "realpath", "(", "$", "this", "->", "dir", "[", "'images'", "]", ".", "$", "requestDirectory", ")", ";", "if", "(", "strpos", "(", "$", "full_r...
Проверка на разрешение записи в папку (не системное) @param string $requestDirectory Запрашиваемая папка (относительно DIR_IMAGES) @return string|bool
[ "Проверка", "на", "разрешение", "записи", "в", "папку", "(", "не", "системное", ")" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L233-L243
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.Tree
function Tree($beginFolder) { $struct = array(); $handle = opendir($beginFolder); if ($handle) { $struct[$beginFolder]['path'] = str_replace(array($this->dir['files'], $this->dir['images']), '', $beginFolder); $tmp = preg_split('[\\/]', $beginFolder); ...
php
function Tree($beginFolder) { $struct = array(); $handle = opendir($beginFolder); if ($handle) { $struct[$beginFolder]['path'] = str_replace(array($this->dir['files'], $this->dir['images']), '', $beginFolder); $tmp = preg_split('[\\/]', $beginFolder); ...
[ "function", "Tree", "(", "$", "beginFolder", ")", "{", "$", "struct", "=", "array", "(", ")", ";", "$", "handle", "=", "opendir", "(", "$", "beginFolder", ")", ";", "if", "(", "$", "handle", ")", "{", "$", "struct", "[", "$", "beginFolder", "]", ...
Дерево каталогов функция рекурсивная @return array
[ "Дерево", "каталогов", "функция", "рекурсивная" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L251-L282
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.DirStructure
public function DirStructure($type, $innerDirs = 'first', $currentDir = '', $level = 0) { //Пока отключим файлы if ($type == 'files') { return ''; } $currentDirArr = array(); if (!empty($currentDir)) { $currentDirArr = preg_split('[\\/...
php
public function DirStructure($type, $innerDirs = 'first', $currentDir = '', $level = 0) { //Пока отключим файлы if ($type == 'files') { return ''; } $currentDirArr = array(); if (!empty($currentDir)) { $currentDirArr = preg_split('[\\/...
[ "public", "function", "DirStructure", "(", "$", "type", ",", "$", "innerDirs", "=", "'first'", ",", "$", "currentDir", "=", "''", ",", "$", "level", "=", "0", ")", "{", "//Пока отключим файлы", "if", "(", "$", "type", "==", "'files'", ")", "{", "return...
Визуализация дерева каталогов функция рекурсивная @param string $type images|files @param string $innerDirs @param string $currentDir @param int $level @return string html
[ "Визуализация", "дерева", "каталогов", "функция", "рекурсивная" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L294-L406
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.DirPath
function DirPath($type, $path = '') { if (!empty($path)) { $path = explode('[\\/]', str_replace($this->dir[$type], '', realpath($path))); $path = array_filter($path); } $ret = '<div class="addrItem" path="" pathtype="' . $type . '" title=""><img src="img/' ....
php
function DirPath($type, $path = '') { if (!empty($path)) { $path = explode('[\\/]', str_replace($this->dir[$type], '', realpath($path))); $path = array_filter($path); } $ret = '<div class="addrItem" path="" pathtype="' . $type . '" title=""><img src="img/' ....
[ "function", "DirPath", "(", "$", "type", ",", "$", "path", "=", "''", ")", "{", "if", "(", "!", "empty", "(", "$", "path", ")", ")", "{", "$", "path", "=", "explode", "(", "'[\\\\/]'", ",", "str_replace", "(", "$", "this", "->", "dir", "[", "$"...
Путь (хлебные крошки) @param string $type images|files @param string $path @return string html
[ "Путь", "(", "хлебные", "крошки", ")" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L415-L446
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.CallDir
private function CallDir($dir) { $dir = $this->AccessDir($dir); if (!$dir) { return false; } set_time_limit(120); if (!is_dir($dir . '/.thumbs')) { $umask = umask(0000); mkdir($dir . '/.thumbs', 0777); umask($u...
php
private function CallDir($dir) { $dir = $this->AccessDir($dir); if (!$dir) { return false; } set_time_limit(120); if (!is_dir($dir . '/.thumbs')) { $umask = umask(0000); mkdir($dir . '/.thumbs', 0777); umask($u...
[ "private", "function", "CallDir", "(", "$", "dir", ")", "{", "$", "dir", "=", "$", "this", "->", "AccessDir", "(", "$", "dir", ")", ";", "if", "(", "!", "$", "dir", ")", "{", "return", "false", ";", "}", "set_time_limit", "(", "120", ")", ";", ...
??? @param string $dir
[ "???" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L455-L567
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.UploadFile
function UploadFile($dir, $type) { $dir = $this->AccessDir($dir, $type); if (!$dir) { return false; } if (!is_dir($dir . '/.thumbs')) { $umask = umask(0000); mkdir($dir . '/.thumbs', 0777); umask($umask); } ...
php
function UploadFile($dir, $type) { $dir = $this->AccessDir($dir, $type); if (!$dir) { return false; } if (!is_dir($dir . '/.thumbs')) { $umask = umask(0000); mkdir($dir . '/.thumbs', 0777); umask($umask); } ...
[ "function", "UploadFile", "(", "$", "dir", ",", "$", "type", ")", "{", "$", "dir", "=", "$", "this", "->", "AccessDir", "(", "$", "dir", ",", "$", "type", ")", ";", "if", "(", "!", "$", "dir", ")", "{", "return", "false", ";", "}", "if", "(",...
Выполняет загрузку файла на сервер @param string $dir @param string $type @return string @since 2.14
[ "Выполняет", "загрузку", "файла", "на", "сервер" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L580-L816
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.RenameFile
function RenameFile($type, $dir, $filename, $newname) { $dir = $this->AccessDir($dir, $type); if (!$dir) { return false; } $filename = trim($filename); if (empty($filename)) { return 'error'; } if (!is_dir($dir . '/.t...
php
function RenameFile($type, $dir, $filename, $newname) { $dir = $this->AccessDir($dir, $type); if (!$dir) { return false; } $filename = trim($filename); if (empty($filename)) { return 'error'; } if (!is_dir($dir . '/.t...
[ "function", "RenameFile", "(", "$", "type", ",", "$", "dir", ",", "$", "filename", ",", "$", "newname", ")", "{", "$", "dir", "=", "$", "this", "->", "AccessDir", "(", "$", "dir", ",", "$", "type", ")", ";", "if", "(", "!", "$", "dir", ")", "...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L821-L877
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.ShowDir
private function ShowDir($dir, $type) { $dir = $this->CallDir($dir, $type); if (!$dir) { //echo 'Ошибка чтения, возможно нет доступа.'; exit(); } $ret = ''; foreach ($dir as $v) { $thumb = $this->GetThumb($v['general']['pat...
php
private function ShowDir($dir, $type) { $dir = $this->CallDir($dir, $type); if (!$dir) { //echo 'Ошибка чтения, возможно нет доступа.'; exit(); } $ret = ''; foreach ($dir as $v) { $thumb = $this->GetThumb($v['general']['pat...
[ "private", "function", "ShowDir", "(", "$", "dir", ",", "$", "type", ")", "{", "$", "dir", "=", "$", "this", "->", "CallDir", "(", "$", "dir", ",", "$", "type", ")", ";", "if", "(", "!", "$", "dir", ")", "{", "//echo 'Ошибка чтения, возможно нет дост...
Возвращает содержимое для области файлов @param string $dir @param string $type @return string
[ "Возвращает", "содержимое", "для", "области", "файлов" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L888-L932
Eresus/EresusCMS
src/ext-3rd/tinymce/plugins/images/connector/php/index.php
TinyImageManager.GetThumb
function GetThumb($dir, $md5, $filename, $mode, $width = 100, $height = 100) { $path = realpath(DIR_ROOT . '/' . $dir); if (is_file($path . '/.thumbs/' . $md5 . '_' . $width . '_' . $height . '_' . $mode . '.jpg')) { return $dir . '/.thumbs/' . $md5 . '_' . $width . '_' . $height...
php
function GetThumb($dir, $md5, $filename, $mode, $width = 100, $height = 100) { $path = realpath(DIR_ROOT . '/' . $dir); if (is_file($path . '/.thumbs/' . $md5 . '_' . $width . '_' . $height . '_' . $mode . '.jpg')) { return $dir . '/.thumbs/' . $md5 . '_' . $width . '_' . $height...
[ "function", "GetThumb", "(", "$", "dir", ",", "$", "md5", ",", "$", "filename", ",", "$", "mode", ",", "$", "width", "=", "100", ",", "$", "height", "=", "100", ")", "{", "$", "path", "=", "realpath", "(", "DIR_ROOT", ".", "'/'", ".", "$", "dir...
-----------------------------------------------------------------------------
[ "-----------------------------------------------------------------------------" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/ext-3rd/tinymce/plugins/images/connector/php/index.php#L937-L951
Eresus/EresusCMS
src/core/CMS/Page/Content.php
Eresus_CMS_Page_Content.render
public function render() { $tmpl = new Eresus_Template(); $tmpl->setSource($this->content); $event = new Eresus_Event_Render($tmpl->compile()); Eresus_Kernel::app()->getEventDispatcher() ->dispatch('cms.client.render_content', $event); return $event->getText(); ...
php
public function render() { $tmpl = new Eresus_Template(); $tmpl->setSource($this->content); $event = new Eresus_Event_Render($tmpl->compile()); Eresus_Kernel::app()->getEventDispatcher() ->dispatch('cms.client.render_content', $event); return $event->getText(); ...
[ "public", "function", "render", "(", ")", "{", "$", "tmpl", "=", "new", "Eresus_Template", "(", ")", ";", "$", "tmpl", "->", "setSource", "(", "$", "this", "->", "content", ")", ";", "$", "event", "=", "new", "Eresus_Event_Render", "(", "$", "tmpl", ...
Отрисовывает контент Контент обрабатывается как шаблон, в него подставляются глобальные переменные, и проводится обработка модулями расширений в соответствии с зарегистрированными обработчиками событий. @return string @since 3.01
[ "Отрисовывает", "контент" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/CMS/Page/Content.php#L96-L105
phpnfe/tools
src/XML.php
XML.get
public function get($key) { if (Str::contains($key, '|')) { $opcoes = explode('|', $key); foreach ($opcoes as $op) { $achado = $this->get($op); if (! $achado->isNull()) { return $achado; } } ...
php
public function get($key) { if (Str::contains($key, '|')) { $opcoes = explode('|', $key); foreach ($opcoes as $op) { $achado = $this->get($op); if (! $achado->isNull()) { return $achado; } } ...
[ "public", "function", "get", "(", "$", "key", ")", "{", "if", "(", "Str", "::", "contains", "(", "$", "key", ",", "'|'", ")", ")", "{", "$", "opcoes", "=", "explode", "(", "'|'", ",", "$", "key", ")", ";", "foreach", "(", "$", "opcoes", "as", ...
Retorna informações do XML com base no caminho separado por ponto. @param $key @return XMLGet
[ "Retorna", "informações", "do", "XML", "com", "base", "no", "caminho", "separado", "por", "ponto", "." ]
train
https://github.com/phpnfe/tools/blob/303ca311989e0b345071f61b71d2b3bf7ee80454/src/XML.php#L25-L59
phpnfe/tools
src/XML.php
XML.getDup
public function getDup($contador) { $dup = $this->getElementsByTagName('dup')->item($contador); return self::createByXml($dup->C14N()); }
php
public function getDup($contador) { $dup = $this->getElementsByTagName('dup')->item($contador); return self::createByXml($dup->C14N()); }
[ "public", "function", "getDup", "(", "$", "contador", ")", "{", "$", "dup", "=", "$", "this", "->", "getElementsByTagName", "(", "'dup'", ")", "->", "item", "(", "$", "contador", ")", ";", "return", "self", "::", "createByXml", "(", "$", "dup", "->", ...
Pega a propriedade do Dup. @param $contador @return XMLGet @deprecated
[ "Pega", "a", "propriedade", "do", "Dup", "." ]
train
https://github.com/phpnfe/tools/blob/303ca311989e0b345071f61b71d2b3bf7ee80454/src/XML.php#L77-L82
phpnfe/tools
src/XML.php
XML.makeFileName
public static function makeFileName($cnpj, $serie, $nnf, $ext, $modelo = '-Nfe') { $nome = $cnpj; $nome .= '_S' . str_pad($serie, 3, '0', STR_PAD_LEFT); $nome .= '_N' . str_pad($nnf, 9, '0', STR_PAD_LEFT); $nome .= $modelo . '.' . $ext; return $nome; }
php
public static function makeFileName($cnpj, $serie, $nnf, $ext, $modelo = '-Nfe') { $nome = $cnpj; $nome .= '_S' . str_pad($serie, 3, '0', STR_PAD_LEFT); $nome .= '_N' . str_pad($nnf, 9, '0', STR_PAD_LEFT); $nome .= $modelo . '.' . $ext; return $nome; }
[ "public", "static", "function", "makeFileName", "(", "$", "cnpj", ",", "$", "serie", ",", "$", "nnf", ",", "$", "ext", ",", "$", "modelo", "=", "'-Nfe'", ")", "{", "$", "nome", "=", "$", "cnpj", ";", "$", "nome", ".=", "'_S'", ".", "str_pad", "("...
Monta o nome padrão do arquivo XML e PDF. @param $cnpj @param $serie @param $nnf @param $ext @param string $modelo @return string @deprecated
[ "Monta", "o", "nome", "padrão", "do", "arquivo", "XML", "e", "PDF", "." ]
train
https://github.com/phpnfe/tools/blob/303ca311989e0b345071f61b71d2b3bf7ee80454/src/XML.php#L117-L125
SergioMadness/query-builder
src/abstraction/SelectBuilder.php
SelectBuilder.generate
public function generate() { $result = ''; $table = $this->buildTable(); $select = $this->buildSelectFields(); $where = $this->buildWhere(); $having = $this->buildHaving(); $join = $this->buildJoin(); $limit = $this->buildLimit(); $group = $this...
php
public function generate() { $result = ''; $table = $this->buildTable(); $select = $this->buildSelectFields(); $where = $this->buildWhere(); $having = $this->buildHaving(); $join = $this->buildJoin(); $limit = $this->buildLimit(); $group = $this...
[ "public", "function", "generate", "(", ")", "{", "$", "result", "=", "''", ";", "$", "table", "=", "$", "this", "->", "buildTable", "(", ")", ";", "$", "select", "=", "$", "this", "->", "buildSelectFields", "(", ")", ";", "$", "where", "=", "$", ...
Generate query @return string
[ "Generate", "query" ]
train
https://github.com/SergioMadness/query-builder/blob/95b7a46bba4c4d369101c6f0d37f133fecb3956d/src/abstraction/SelectBuilder.php#L104-L146