public function findBehaviorsFor($times)
    {
        // No behaviors set yet.
        if (is_null($this->behavior)) {
            return null;
        }

        // Specifically convert times to array.
        $times = ! is_array($times) ? [$times] : $times;

        // Return Behavior at specific times
        $behaviors = $this->behavior->reject(function (BehaviorNode $behavior) use ($times) {
            return ! in_array($behavior->name, $times);
        });

        // Only one item.
        if ($behaviors->count() == 1) {
            return $behaviors->first();
        }

        return $behaviors;
    }
public function findBehaviorsFor($times)
    {
        // No behaviors set yet.
        if (is_null($this->behavior)) {
            return null;
        }

        // Specifically convert times to array.
        $times = ! is_array($times) ? [$times] : $times;

        // Return Behavior at specific times
        $behaviors = $this->behavior->reject(function (BehaviorNode $behavior) use ($times) {
            return ! in_array($behavior->name, $times);
        });

        // Only one item.
        if ($behaviors->count() == 1) {
            return $behaviors->first();
        }

        return $behaviors;
    }
public function findBehaviorsFor ( $ times ) { // No behaviors set yet. if ( is_null ( $ this -> behavior ) ) { return null ; } // Specifically convert times to array. $ times = ! is_array ( $ times ) ? [ $ times ] : $ times ; // Return Behavior at specific times $ behaviors = $ this -> behavior -> reject ( function ( BehaviorNode $ behavior ) use ( $ times ) { return ! in_array ( $ behavior -> name , $ times ) ; } ) ; // Only one item. if ( $ behaviors -> count ( ) == 1 ) { return $ behaviors -> first ( ) ; } return $ behaviors ; }
Find Behaviors a give times or Days.

@param array|string $times

@return Collection|BehaviorNode|null
Find Behaviors a give times or Days .